User forums > Help
Include file not found
oBFusCATed:
How have you made C::B to incorporate include in your sources?
bangorme:
--- Quote from: oBFusCATed on July 14, 2014, 02:04:04 am ---How have you made C::B to incorporate include in your sources?
--- End quote ---
I apologize, but I don't understand your question.
bangorme:
Were you asking if a scope resolution operator works using my instructions? Yes it does. So I can refer to a definition in a header file using :: as long as I include the header file.
oBFusCATed:
Nope. I'm asking how have you added the file in <project_root>/include?
bangorme:
--- Quote from: oBFusCATed on July 14, 2014, 02:42:52 am ---Nope. I'm asking how have you added the file in <project_root>/include?
--- End quote ---
Ok, when I want to make a header file for a project, I do file->new->class and codeblocks automatically creates /headers/include in the project and creates the header template file in the include folder. This folder is within the project. Compiling at that point gives the error that the header can't be found. Using the method I stated above, causes the compiler to search that folder for header files.
But, now that I'm thinking about it, my method works, but is not correct. I think it makes this project header folder the global header folder for all projects. The proper way (which makes the project header folder searchable by only this project) would be the way I think you spoke of earlier. Project->Build Options->Search Directories tab. On the left you will see the project name, debug and release. Click the project name. 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.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version