hi, i just came across the following problem using chicken 2.41 on a linux system:
[EMAIL PROTECTED]:~/test$ cat test.scm (define-foreign-variable installation-home c-string "C_INSTALL_HOME") (printf "C_INSTALL_HOME = ~s\n" installation-home) [EMAIL PROTECTED]:~/test$ csc -v test.scm /usr/local/bin/chicken test.scm -output-file test.c -quiet gcc test.c -o test.o -c -DHAVE_CHICKEN_CONFIG_H -Os -fomit-frame-pointer -fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized -DHAVE_ALLOCA_H -DC_ENABLE_PTABLES -DC_STACK_GROWS_DOWNWARD=1 -DC_INSTALL_LIB_HOME="/usr/local/lib/chicken/1" -DC_INSTALL_HOME="/usr/local/share/chicken" -DC_USE_C_DEFAULTS -DC_NO_PIC_NO_DLL test.c: In function `f_18': test.c:122: error: syntax error before '/' token test.c:122: error: too many arguments to function `C_mpointer' test.c:122: error: syntax error before ';' token *** Shell command terminated with exit status 1: gcc test.c -o test.o -c -DHAVE_CHICKEN_CONFIG_H -Os -fomit-frame-pointer -fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized -DHAVE_ALLOCA_H -DC_ENABLE_PTABLES -DC_STACK_GROWS_DOWNWARD=1 -DC_INSTALL_LIB_HOME="/usr/local/lib/chicken/1" -DC_INSTALL_HOME="/usr/local/share/chicken" -DC_USE_C_DEFAULTS -DC_NO_PIC_NO_DLL [EMAIL PROTECTED]:~/test$ the problem are missing quotes around C_INSTALL_LIB_HOME and C_INSTALL_HOME. the quotes that are there are taken by the shell but additional ones are needed by the c compiler: [EMAIL PROTECTED]:~/test$ gcc test.c -o test.o -c -DHAVE_CHICKEN_CONFIG_H -Os -fomit-frame-pointer -fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized -DHAVE_ALLOCA_H -DC_ENABLE_PTABLES -DC_STACK_GROWS_DOWNWARD=1 -DC_INSTALL_LIB_HOME="\"/usr/local/lib/chicken/1\"" -DC_INSTALL_HOME="\"/usr/local/share/chicken\"" -DC_USE_C_DEFAULTS -DC_NO_PIC_NO_DLL [EMAIL PROTECTED]:~/test$ csc -v -o test test.o gcc test.o -lchicken -o test -L/usr/local/lib -Wl,-R/usr/local/lib -ldl -lpcre -lffi -lm -ldl -lpcre -lffi -lchicken [EMAIL PROTECTED]:~/test$ ./test C_INSTALL_HOME = "/usr/local/share/chicken" [EMAIL PROTECTED]:~/test$ i don't know if this bug has already been fixed in the current darcs version (as there has been some discussion about quotes on the list lately), i just wanted to report it in case it isn't. bye, hans. _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
