My first pick is of course the Visual C version.
So I make 3 files (copied from the documentation)
m1.c
Code: Select all
int power_of_2 (int x) { return 1<<x; }
Code: Select all
(c-declare "extern int power_of_2 ();")
(define pow2 (c-lambda (int) int "power_of_2"))
(define (twice x) (cons x x))
Code: Select all
(write (map twice (map pow2 '(1 2 3 4)))) (newline)
Code: Select all
gsc -link m2 m3
I guessed there was something wrong with the visual C version, so I tried the same thing using the MinGW version.
It worked, and indeed there was a m3_.c
And after some trial and errors, I found the required libraries:
Code: Select all
gcc m1.c m2.c m3.c m3_.c -o firstprog -lgambc -lwsock32 -lws2_32
I still don't know why the visual C version fails.
Anybody have a similiar experience on this thing?