GLBasic forum

Main forum => GLBasic - en => Topic started by: bigsofty on 2011-Aug-24

Title: Compiler Command Line Arguments - Include a searchpath dir
Post by: bigsofty on 2011-Aug-24
Hi,

I am trying to use the project settings optional "Command Line Argument" (-IC:\myheaders"), to force the GCC compiler to add a search path for some #inlined C headers. The headers are not found, any tips on how to achieve a search path for a bunch of C headers at compile time?
Title: Re: Compiler Command Line Arguments - Include a searchpath dir
Post by: Kitty Hello on 2011-Aug-24
put them in the project directory. It will search there.

The option >> -I"C:\MyHeaders"<< for "cmp" should work, too.
Title: Re: Compiler Command Line Arguments - Include a searchpath dir
Post by: bigsofty on 2011-Aug-24
Nope does not work for me?

Code (glbasic) Select
C:\Users\Dad\AppData\Local\Temp\glbasic\gpc_temp0.cpp:23:18: test.h: No such file or directory
*** FATAL ERROR - Please post this output in the forum


Code (glbasic) Select
INLINE
#include "test.h"
ENDINLINE

Code (glbasic) Select
#ifndef ImHere
#define ImHere
#endif

Code (glbasic) Select
-I"C:\MyHeaders"

It works if I copy a header into one of GLBs default (eg. "C:\Program Files (x86)\GLBasic\Compiler\platform\Include") search paths but I want to avoid messing with the compiler dir if I can.
Title: Re: Compiler Command Line Arguments - Include a searchpath dir
Post by: Kitty Hello on 2011-Aug-24
the project path is included. Is that an option?
When you add a stupid option --please-dont-know-this, will it complain?
Maybe the cmp box isn't used?
Title: Re: Compiler Command Line Arguments - Include a searchpath dir
Post by: bigsofty on 2011-Aug-24
Oooh, added, -funkeymunky, it was not perturbed in the slightest... not good!  :P
Title: Re: Compiler Command Line Arguments - Include a searchpath dir
Post by: Kitty Hello on 2011-Aug-24
OK. Worked for me. Are you sure you added it to "Win32" configuration?
Title: Re: Compiler Command Line Arguments - Include a searchpath dir
Post by: bigsofty on 2011-Aug-24
Tried this on the laptop, its working fine.  :( I'' do a clean GLB install and see if that helps.
Title: Re: Compiler Command Line Arguments - Include a searchpath dir
Post by: bigsofty on 2011-Aug-24
Hmmm, clean install sorted the problem... no idea what happened. Thanks for looking into it for me Gernot!  :)