<div dir="ltr">Colin, Gambit does its own compilation work using /usr/local/Gambit-C/bin/gambc-cc , check it out. Run Gambit with the env var GAMBC_CC_VERBOSE=yes set and thescript will print out what it does, giving you a better clue. Mikael<div class="gmail_extra"><br><div class="gmail_quote">2015-02-11 10:10 GMT+05:30 Colin Gilbert <span dir="ltr"><<a href="mailto:colingilbert86@gmail.com" target="_blank">colingilbert86@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,<br><br></div>Pardon the silly noob question, but I've been trying to use Gambit to quickly write up a small submodule, and then use each target's native compiler to embed it into the build. Unfortunately, I am getting link errors:<br><div><br>Is my my mini program:<br>hello.scm: (display "hello") (newline)<br><br>Here is what happens when I try to use it.<br><br>>> gsc -c hello.scm<br>*** INFO -- loading syntax expander<br><br>>> gcc hello.c<br><br>cc hello.c<br>/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.3/../../../../lib64/crt1.o: In function `_start':<br>(.text+0x20): undefined reference to `main'<br>/tmp/ccpGbiFh.o: In function `___H__20_hello':<br>hello.c:(.text+0x8d): undefined reference to `___gstate0'<br>hello.c:(.text+0xd4): undefined reference to `___gstate0'<br>hello.c:(.text+0xee): undefined reference to `___G_display'<br>hello.c:(.text+0x132): undefined reference to `___G_display'<br>hello.c:(.text+0x144): undefined reference to `___gstate0'<br>hello.c:(.text+0x176): undefined reference to `___gstate0'<br>hello.c:(.text+0x194): undefined reference to `___G_newline'<br>hello.c:(.text+0x1d5): undefined reference to `___G_newline'<br>hello.c:(.text+0x1e7): undefined reference to `___gstate0'<br>/tmp/ccpGbiFh.o: In function `___setup_mod':<br>hello.c:(.text+0x25c): undefined reference to `___G__20_hello'<br>/tmp/ccpGbiFh.o: In function `___init_mod':<br>hello.c:(.text+0x26f): undefined reference to `___gstate0'<br>hello.c:(.text+0x281): undefined reference to `___G__20_hello'<br>/tmp/ccpGbiFh.o: In function `____20_hello':<br>hello.c:(.text+0x29b): undefined reference to `___S_hello'<br>collect2: error: ld returned 1 exit status<br><br>I tried using -link, -flat,-link -flat but no real difference.<br><br>What files need to be present before you can compile the code natively?<br><br></div></div>
<br>_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca" target="_blank">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list" target="_blank">https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list</a><br>
<br></blockquote></div><br></div></div>