F1004
C++ Builder Programming Language
Severity:What Does This Error Mean?
F1004 is a fatal compile error: the compiler tried to open a file specified in a #include directive but could not find it. The message reads: [BCC64 Fatal] F1004 No such file or directory: 'filename.h'. Adding the directory containing the header to Project Options > C++ Compiler > Include Files fixes it.
Affected Models
- C++ Builder 10.x (Alexandria)
- C++ Builder 11 (Sydney)
- C++ Builder 12 (Athens)
- RAD Studio 11 and 12
Common Causes
- The directory containing the header is not in the project's Include Path
- A third-party library was installed but its include path was not added to Project Options
- A typo in the #include filename or path
- Using angle brackets <file.hpp> for a project-local header instead of quotes
- A file that was part of the project has been moved or deleted from disk
How to Fix It
-
Verify the file exists on disk. Locate the installation directory of the library and find the header file named in the error.
If the file does not exist at all, the library may not be installed — run its installer or download the SDK.
-
Add the header's directory to the Include Path. Go to Project > Options > Building > C++ Compiler > Paths and Defines > Include Path. Add the full path to the folder containing the header.
Example: if the header is at C:\MyLib\include\mylib.h, add C:\MyLib\include to the Include Path. Use semicolons to separate multiple paths.
-
Check whether you are using the correct include syntax. Use #include "myfile.h" (quotes) for files in your own project directories. Use #include <systemfile.h> (angle brackets) for SDK and library headers.
Quotes search the current file's directory and the project's Include Path. Angle brackets search only the system-configured include directories. For most project-local headers, quotes are correct.
-
If the error appeared after moving the project to a new machine or folder, update the Include Path entries in Project Options — absolute paths break when the project moves.
Use relative paths in Include Path settings where possible (e.g., ..\include) so the project is portable. Relative paths are resolved from the project file's location.
Frequently Asked Questions
Can F1004 cause a cascade of other errors?
Yes — F1004 is a fatal error and stops compilation of that unit immediately. All the types and functions declared in the missing header are unknown, which would have generated many E2268 and E2065 errors. Fix F1004 and the cascade usually disappears.
Is F1004 the same as MSVC C1083?
Yes — both mean the compiler cannot find a file specified in a #include directive. The diagnosis and fix are identical: find where the file is installed and add that directory to the compiler's include path.