User forums > Using Code::Blocks
How to set relative include path?
(1/1)
Turrican:
Hello
Guess I have a simple question, but I can't find the solution. Well, I thought about giving CB a try, and installed it on my Linux desktop, created a simple C++ testing app where I created a class, and separated the header & source file into the directories base/include and base/src. My problem is, I don't know how to set a relative include path to use #include "myheader.h" instead of ../include/myheader.h for building.
Thanks for help in advance
btw: CB seems to be fine.
MortenMacFly:
--- Quote from: Turrican on June 22, 2007, 02:41:26 am ---I don't know how to set a relative include path to use #include "myheader.h" instead of ../include/myheader.h for building.
--- End quote ---
Look into your project' build options. There is a tab where you can setup directories for the compiler and linker. You need to add the directory to your header file in the compiler include path's and that basically it. It should correspond then to something like -I..\..\include on the compiler command line then.
With regards, Morten
Turrican:
Thanks, worked instantly.
Navigation
[0] Message Index
Go to full version