User forums > Help
Include file not found
bangorme:
This problem comes from typing in a program contained within a text. I get this error message:
<<
/home/xxxxx/Documents/Code Blocks Prj/Airline_Ticket_Test/main.cpp|5|fatal error: Headers.AirlineTicket.h: No such file or directory|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|
<<
AirlineTicket.h is located within the header/include folder of my project. Anyone know why it isn't being seen?
oBFusCATed:
Probably because you've not told the compiler which folder is your include folder. ::)
bangorme:
--- Quote from: oBFusCATed on July 11, 2014, 10:54:00 pm ---Probably because you've not told the compiler which folder is your include folder. ::)
--- End quote ---
Ok, I'll bite. So the compiler doesn't look for header files automatically in the header folder within the project? If not, does this have to be set for each project, or is there a setting (which I haven't found yet)? Thanks for the help.
oBFusCATed:
Yes, it doens't. Project -> Build options -> Target /project -> Search directory -> Compiler
bangorme:
I've seen a bunch of posts from people new to CodeBlocks with this problem. I solved it by going to settings->compiler->search directories tab. Then just press the "new" button. In the box that comes up is a button the allows you to see the project directory and just click the "include" directory under your project. The compiler will now look in your project include directory for header files. It doesn't seem intuitive that codeblocks would incorporate an include folder in the project directory and NOT search it for project header files, but it is what it is. ???
Navigation
[0] Message Index
[#] Next page
Go to full version