[gambit-list] Dump a .c file into another program's structure and compile it from another compiler?

Marc Feeley feeley at iro.umontreal.ca
Thu Feb 12 07:07:23 EST 2015


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 at gmail.com> wrote:
> 
> Great. Remember to write up your findings on the Wiki.
> 
> 2015-02-12 8:43 GMT+05:30 Colin Gilbert <colingilbert86 at 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4839 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20150212/6dd8c18a/attachment.bin>


More information about the Gambit-list mailing list