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:
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
Afficher les réponses par date
David St-Hilaire wrote:
It's not byte code, but a shared library.
$ file test.o1 test.o1: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped $ file /lib/libc-2.3.2.so /lib/libc-2.3.2.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped $ objdump -d test.o1 # outputs disassembled machine code
Christian.
I wrote:
(Minor addition:
Actually that's a bit of a bad comparison example, since libc.so really is executable, which is the exception.
Usually shared libraries are not executable directly, and usually also don't carry the executable bit in their file permissions. Marc, if there isn't any reason for the executable flag on the Gambit loadable objects, dropping it may prevent confusion. I actually did wonder when I started using Gambit why those files are +x, but then just ignored the fact.
Christian. )