News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

How to set relative include path?

Started by Turrican, June 22, 2007, 02:41:26 AM

Previous topic - Next topic

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.
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
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Turrican