User forums > Using Code::Blocks

In Build, Trying to Bring In A Non-standard Include Folder

(1/3) > >>

sefronia:
As I attempt to compile my program in Code::Blocks, the compiler doesn't know my other, non-standard include folder which holds my header files exists.  I've assigned the path to this location both in my Project compiler options and in Settings > Compiler > Linker & Directories.  I'm also wondering if I've got my Environment Variables assigned properly in Windows.  When I copy the header file into my Code::Blocks Include folder, the program sees it and the error is resolved.

I'm trying to understand the linkage relationships that need to be in place here.

Thanks for any assistance available.

mariocup:
Hi sefronia,

you have to add the directories containing the header files to your search directories.
Select the menu Project->Build Options then go to the tab "Search Directories". In the Compiler tab of this dialogue add the path containing the headers or additional sources.
To see in detail what happens during compilation, just enable "Full command line" in the menu Settings->Compiler and Debugger->Other settings.

Bye,

Mario

sefronia:
Hi, mariocup,

Thanks for this reply.  I became aware today that it was out there.  (New to Code::Blocks and Forums).  I put in place your recommendations, and I see improvement.  Now I seem to be having a compiler assignment problem of a different nature, as my error messages are now these:

-------------- Build: Debug in STK_ver ---------------

mingw32-g++.exe  /Zi /D_DEBUG /MDd    -I..\..\..\..\..\naif\cspice\lib -I..\..\..\..\..\naif\cspice\include  -c "C:\Documents and Settings\sefronia\My Documents\Code_Blocks_Projects\STK_ver\main.cpp" -o obj\Debug\main.o
mingw32-g++.exe: /Zi: No such file or directory
mingw32-g++.exe: /D_DEBUG: No such file or directory
mingw32-g++.exe: /MDd: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

I will double check my compiler assignments and see if I can resolve it further, but I sure do appreciate your help!

mariocup:
Where are the directories Zi and D_DEBUG located on our filesystem? What does they contain? Perhaps you can attach your cbp file and I have a look at it.

Jenna:
You try to use MinGW compiler with M$-options.

That can never work.

gcc treats the unknown options (correctly) as directories and/or input-files.

Navigation

[0] Message Index

[#] Next page

Go to full version