[SCore-users] charmm under SCore

kameyama at pccluster.org kameyama at pccluster.org
Tue Oct 29 09:15:35 JST 2002


In article <Pine.LNX.4.44.0210281425220.10806-100000 at kenzo.iwr.uni-heidelberg.de> Bogdan Costescu <bogdan.costescu at iwr.uni-heidelberg.de> wrotes:
> But this reminded me of something that _is_ related to SCore: while a 
> normal invocation of the compiler works with something like:
> 
> gcc -DOS="LINUX" -o x x.c
> 
> where x.c is something like:
> 
> #include <stdio.h>
> int main(void) {
> printf("OS is: %s\n", OS);
> }

I test this (On redhat 7.2/gcc 2.96).
But following result is happen.
eyama at develop kameyama]$ ./tt1
OS is LINUX
    $ gcc -DOS="LINUX" tt.c -o tt1
    tt.c: In function `main':
    tt.c:4: `LINUX' undeclared (first use in this function)
    tt.c:4: (Each undeclared identifier is reported only once
    tt.c:4: for each function it appears in.)
these command line is successfull
    $ gcc -DOS=\"LINUX\" tt.c -o tt1
    $ mpicc -DOS=\"LINUX\" tt.c -o tt1
But if you want to string include space in command line as following:
    $ gcc '-DOS="LINUX test"' tt.c -o tt1
    $ mpicc '-DOS="LINUX test"' tt.c -o tt1
gcc is worked butg mpicc is not work.

                       from Kameyama Toyohisa



More information about the SCore-users mailing list