Author Topic: In Build, Trying to Bring In A Non-standard Include Folder  (Read 7275 times)

Offline sefronia

  • Single posting newcomer
  • *
  • Posts: 7
In Build, Trying to Bring In A Non-standard Include Folder
« on: March 28, 2008, 09:28:39 pm »
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

  • Guest
Re: In Build, Trying to Bring In A Non-standard Include Folder
« Reply #1 on: March 28, 2008, 10:44:53 pm »
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

Offline sefronia

  • Single posting newcomer
  • *
  • Posts: 7
Re: In Build, Trying to Bring In A Non-standard Include Folder
« Reply #2 on: June 30, 2009, 12:01:39 am »
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

  • Guest
Re: In Build, Trying to Bring In A Non-standard Include Folder
« Reply #3 on: June 30, 2009, 09:48:22 am »
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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: In Build, Trying to Bring In A Non-standard Include Folder
« Reply #4 on: June 30, 2009, 09:59:01 am »
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.

Offline sefronia

  • Single posting newcomer
  • *
  • Posts: 7
Re: In Build, Trying to Bring In A Non-standard Include Folder
« Reply #5 on: June 30, 2009, 10:32:25 pm »
In my global assignments I have the compiler set to GNU GCC Compiler.  And yet, your theory, jens, is that somehow there are M$ (Is this Microsoft?) options associated with my configuration.  So the MinGW compiler (synonymous with GNU GCC Compiler, am I correct?) sees these MS options (Zi, D_DEBUG, MDd) with which it is not familiar and interprets them to be directories which it then cannot find.  Is my understanding of this correct?  Might this have something to do with the fact that I have had this code running successfully in MS Visual Studio PE2005, and something in the code is telling CodeBlocks to associate these heldover options?  Or is it more likely that I have not yet made all of my CodeBlocks compiler and project assignments comprehensively accurate and specific enough yet?

In my next post I will attach the very short piece of code which I am attempting to compile and run.  Thanks!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: In Build, Trying to Bring In A Non-standard Include Folder
« Reply #6 on: July 01, 2009, 02:57:33 pm »
That happens when you switch the compiler for the target/project you are compiling.

From MS C++ to GCC and the reverse. C::B doesn't know how to match the options from one compiler to the other.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sefronia

  • Single posting newcomer
  • *
  • Posts: 7
Re: In Build, Trying to Bring In A Non-standard Include Folder
« Reply #7 on: July 01, 2009, 07:23:01 pm »
oBFusCATed,

I certainly don't mean to sound flippant here, but what's the fix?

Thanks,

sefronia

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: In Build, Trying to Bring In A Non-standard Include Folder
« Reply #8 on: July 01, 2009, 07:30:45 pm »
Hm, you have not clicked around the Build options dialog, it seems ...

So here is your solution: project -> build options -> the target you are building and the project (root) -> compiler settings -> other settings -> delete anything wrong here
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline sefronia

  • Single posting newcomer
  • *
  • Posts: 7
Re: In Build, Trying to Bring In A Non-standard Include Folder
« Reply #9 on: July 01, 2009, 07:50:41 pm »
OK, I have nothing assigned under compiler settings -> other settings.  I only have made assignments under linker settings and search directories tabs in the same window, and there I have assigned paths to my external library and my external includes.  Thx, s.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: In Build, Trying to Bring In A Non-standard Include Folder
« Reply #10 on: July 01, 2009, 08:07:11 pm »
Do you have anything in global compiler settings ?

Offline sefronia

  • Single posting newcomer
  • *
  • Posts: 7
Re: In Build, Trying to Bring In A Non-standard Include Folder
« Reply #11 on: July 01, 2009, 08:13:07 pm »
Global Compiler Settings - nothing in compiler settings or in search directories.  Just paths to ext lib and ext include in linker settings.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: In Build, Trying to Bring In A Non-standard Include Folder
« Reply #12 on: July 01, 2009, 10:42:35 pm »
I would double check; by looking under project settings Other Options

"Project" -> "Build options"
1. Tab "Compiler Settings" SubTab "Other Options"
2. Tab "Linker Settings" Window "Other Linker Options"

Note: You need to check the above for all project targets listed in left hand list.

Tim S
« Last Edit: July 01, 2009, 10:45:06 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org