Can't include local header files
bobpaw opened this issue · 2 comments
When compiling, I am unable to include local files using the include "file.h"
syntax. This is even with the -I.
GCC switch. The compiler always errors with "No such file or directory." I am able to compile when providing GCC with the absolute path. This leads me to believe that GCC4TI does not use the current project as the working directory (a clear error).
Does that occur while building a project from the Windows Delphi IDE ? It has a... peculiar way to handle relative paths, related to the usage of a temporary folder for building projects. Also, the "virtual folder"... thing. Try building the same project with tprbuilder
, which does not emulate this behaviour, from the directory containing the project.
Out of the box, some TPRs which can be built using the Windows IDE can't be built using tprbuilder, and vice-versa... TPRs are meant to help users build their projects with coherent sets of compiler, assembler and linker flags; however, the tigcc
CLI front-end for the toolchain is much closer to a normal toolchain, more flexible and more powerful.
You can send me a copy of the project privately, and I'll take a look, but I think that what you're experiencing stems from the above :)
The proper way to resolve that issue, if it is indeed due to using the IDE (KTIGCC behaves the exact same way, by the way), is to just add the header file to the project, instead of relying on a tprbuilder
bug. (Fixing tprbuilder
to build in a temporary directory just like the IDEs do is one of the things I had always meant to do in TIGCC and just never got around to. And @debrouxl does not even want to fix that bug, it seems.)