Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't include local header files #10

Open
bobpaw opened this issue Sep 10, 2019 · 2 comments
Open

Can't include local header files #10

bobpaw opened this issue Sep 10, 2019 · 2 comments

Comments

@bobpaw
Copy link

bobpaw commented Sep 10, 2019

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).

@debrouxl
Copy link
Owner

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 :)

@kkofler
Copy link

kkofler commented Oct 28, 2021

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants