This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Please help me passing a path to preprocessor


In gcc, you would write:
#define MYPATH "/bla"
Thus, the compile command should be:

	gcc -DMYPATH='"/bla"' a.c

Please note that you can't use
	gcc -DMYPATH="/bla" a.c
since the command interpreter will eat the double quotes. That's why the 
single quotes are there.

On Tuesday 25 November 2003 16:10, jp.guillemin@free.fr wrote:
> Hello,
>
> I think my question is a very simple one...
>
> I'm trying to declare a preprocessor constant with -D
> MYPATH='/usr/local/thepath/' (from a makefile)
>
> - The constant is found declared by preprocessor
> - I get a "Syntax error near `/' token"
>
> Best regards
> jp
>
>
>
>
> ---------------------------------------------------------------
> Acasa.ro vine cu albumele, tu vino doar cu pozele ;)
> http://poze.acasa.ro/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]