This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Please help me passing a path to preprocessor
- From: Mihnea Balta <dark_lkml at mymail dot ro>
- To: jp dot guillemin at free dot fr, gcc-help at gcc dot gnu dot org
- Date: Tue, 25 Nov 2003 16:20:49 +0200
- Subject: Re: Please help me passing a path to preprocessor
- References: <1069769401.3fc362ba032ce@imp2-l.free.fr>
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/