oups forgot to include the gambit-list in my repluy ;)
-------- Original Message -------- Subject: Re: [gambit-list] Hello World segfaults on me Date: Sun, 03 Feb 2008 10:15:47 -0500 From: David St-Hilaire sthilaid@iro.umontreal.ca To: Francisco Listas francisco.listas@gmail.com References: 8d9da3cf0802030633j40e82a56gdc3e6d55fe53915a@mail.gmail.com
Francisco Listas wrote:
I am running Ubuntu 7.10, and I've just installed (using synaptic) Gambit-C. To try my installation, I just wrote (in file hello.scm) this hello world program:
(display "Hello World!\n")
Running: gsi hello.scm
Produces the expected output.
Running: gsc hello.scm
Produces hello.o1 executable file, but when I run it, a segfault occurs: ./hello.o1
Thats where your error lies. Here is what you should do instead:
dave@david ~/temp $ echo '(display "allo tout le monde!\n")' > test.scm dave@david ~/temp $ gsi test.scm allo tout le monde! dave@david ~/temp $ gsc test.scm dave@david ~/temp $ gsi test allo tout le monde! dave@david ~/temp $
I am not 100% sure here but I believe that the .o1 file format is some kind of gambit byte code. To get an executable, you need to do the following:
dave@david ~/temp $ echo '(display "allo tout le monde!\n")' > test.scm dave@david ~/temp $ gsc -link test.scm dave@david ~/temp $ gcc test.c test_.c -lgambc dave@david ~/temp $ ./a.out allo tout le monde! dave@david ~/temp $
Hope that could help you! :D
David