Re: Please help me passing a path to preprocessor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx 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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux