The -lm is required on some system but not others. You might need other options on some compilers. That is one of the portability issues that the configure script solves.
Marc
On Feb 12, 2015, at 5:17 AM, Mikael mikael.rcv@gmail.com wrote:
Great. Remember to write up your findings on the Wiki.
2015-02-12 8:43 GMT+05:30 Colin Gilbert colingilbert86@gmail.com: Hi, I would like to add a quick addition to method #2: you need to add "-lm" at the end or else you'll get endless compiler errors about undefined references to standard math libraries. The full command is:
gcc -O1 -DHAVE_ERRNO_H -DHAVE_STDLIB_H -DHAVE_STRING_H -D___VOIDSTAR_WIDTH=8 -D___MAX_CHR=0x10ffff -D___BOOL=int -D___SINGLE_VM -D___SINGLE_THREADED_VMS -D___USE_NO_THREAD_SYSTEM -D___NO_THREAD_LOCAL_STORAGE_ CLASS -D___LABEL_ACCESS_OLD -D___SINGLE_HOST -D___GAMBCDIR='"/usr/local/Gambit-C"' *.c -o hello.exe -lm