All of those messages are warnings. Just add a compile flag to remove the warnings (and not treat them as errors). I don’t know what the flag is for clang.
Marc
On Feb 17, 2015, at 12:30 PM, Francois Magnan fmagnan@me.com wrote:
Salut Marc,
I’m trying to integrate a Gambit-C program into the XCode workflow. I tried a minimal example:
———— program.scm —————
(c-define (factorial n) (char-string) char-string "factorial" "" (number->string (fact (string->number n))))
(define (fact n) (if (= n 0) 1 (* n (fact (- n 1)))))
———— program.scm —————
Then I call:
gsc -link program
and that generated program_.c and program.c
I then add those two files to my XCode project and then
— Add the /usr/local/Gambit-C/include to my headers search path — Add the /usr/local/Gambit-C/lib to my libraries search path — Add -lgambc as a linked flag — Add gambit_setup() and gambit_cleanup() functions and call then at the appropriate time
But when I compile the project I get a series of errors:
/Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:106:1: Variable '___result' is used uninitialized whenever 'if' condition is false /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:174:1: Unused variable '___u32_temp' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:174:1: Unused variable '___s32_temp' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:183:13: Unused label '___L__20_program' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:174:1: Unused variable '___u64_temp' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:174:1: Unused variable '___temp' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:174:1: Unused variable '___s64_temp' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:201:1: Unused variable '___s32_temp' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:201:1: Unused variable '___u64_temp' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:214:13: Unused label '___L_factorial' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:201:1: Unused variable '___s64_temp' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:201:1: Unused variable '___u32_temp' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:266:13: Unused label '___L_fact' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:244:1: Unused variable '___u64_temp' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:244:1: Unused variable '___s64_temp' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:244:1: Unused variable '___u32_temp' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:244:1: Unused variable '___s32_temp' /Users/magnan/Desktop/cef_binary_3.2295.2032_macosx64/cefsimple/program.c:437:1: Unused variable ‘___ps'
What am I doing wrong? I used to do that technique for iOS apps before but now it broke. I am trying to build a MaxOSX app.
Thank you, Francois Magnan