Re: Help with FFI related error message
/usr/local/Gambit-C/bin/gsi lorenz.scm *** ERROR IN "lorenz.scm"@36.1 -- /usr/local/Gambit-C/bin/gsi: undefined symbol: ____20_glut_2d_ffi_2e_o1 (load "glut-ffi.o1")
I assume that ____20_glut_2d_ffi_2e_o1 is the symbol. Only problem is I can figure out why it's looking for that symbol, not too mention the curious coincidence that the symbol it's looking for is the name of the file I am trying to load.
Here's a guess... did you rename this file, i.e. mv glut-ffi.o2 glut-ffi.o1 That will not work. The function ____20_glut_2d_ffi_2e_o1 is generated by the Gambit-C compiler in the file "glut-ffi.o1" and corresponds to the initialization function. It has the "o1" part to distinguish the function from the initialization function ____20_glut_2d_ffi_2e_o2 generated in "glut-ffi.o2", if you happen to want to want to load "glut-ffi.o1" and later "glut-ffi.o2" in the same execution of gsi (some operating systems get confused when there are two functions with the same name). Another possibility is that your operating system adds a "_" prefix, or suffix to the symbols and the configure script did not detect this (check the definition of the symbols ___IMPORTED_ID_PREFIX and ___IMPORTED_ID_SUFFIX at the end of include/config.h). Marc
Afficher les réponses par date
Hi Marc, thanks for the quick response. No renaming is involved, I think. It has something to do with how I am compiling the file. I've noticed that the problem disappears if I do gsc -dynamic etc... Here is the compile line I was using which causes the problem. I meant to include it in the original e-mail and forgot. $(CC) -shared -D___DYNAMIC -I/usr/include/GL -I $(GAMBINC) -o glut-ffi.o1 \ glut-ffi.c glut-ffi_.c conv.o -L/usr/X11R6/lib/ -lgl You may be wondering why I am doing this "manually" instead of using gsc -dynamic ? I can't remember - I'm picking up some old code and making it work with gambit 4b12. I figure that an OpenGL binding for Gambit would be handy :-) Brian
Hi Marc,
thanks for the quick response.
No renaming is involved, I think.
It has something to do with how I am compiling the file.
I've noticed that the problem disappears if I do
gsc -dynamic etc...
Here is the compile line I was using which causes the problem. I meant to include it in the original e-mail and forgot.
$(CC) -shared -D___DYNAMIC -I/usr/include/GL -I $(GAMBINC) -o glut-ffi.o1 \ glut-ffi.c glut-ffi_.c conv.o -L/usr/X11R6/lib/ -lgl
Ah OK. Then you need to do this when you generate the .c files: gsc -c -o glut-ffi.o1.c glut-ffi.scm gsc glut-ffi.o1.c This will generate the files glut-ffi.o1.c and glut-ffi.o1_.c which you can then compile as before. Marc
Ah OK. Then you need to do this when you generate the .c files:
gsc -c -o glut-ffi.o1.c glut-ffi.scm gsc glut-ffi.o1.c
This will generate the files glut-ffi.o1.c and glut-ffi.o1_.c which you can then compile as before.
Scratch that... since you are generating an object file, all you need is gsc -c -o glut-ffi.o1.c glut-ffi.scm $(CC) -shared -D___DYNAMIC -I/usr/include/GL -I $(GAMBINC) -o glut-ffi.o1 glut-ffi.o1.c conv.o -L/usr/X11R6/lib/ -lgl Marc
Marc: Shut down one of gambit4-beta or gambit-list, I'm getting tired of getting two copies of all these messages. Brad On Apr 10, 2005, at 9:14 PM, Marc Feeley wrote:
Ah OK. Then you need to do this when you generate the .c files:
gsc -c -o glut-ffi.o1.c glut-ffi.scm gsc glut-ffi.o1.c
This will generate the files glut-ffi.o1.c and glut-ffi.o1_.c which you can then compile as before.
Scratch that... since you are generating an object file, all you need is
gsc -c -o glut-ffi.o1.c glut-ffi.scm $(CC) -shared -D___DYNAMIC -I/usr/include/GL -I $(GAMBINC) -o glut-ffi.o1 glut-ffi.o1.c conv.o -L/usr/X11R6/lib/ -lgl
Marc _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca http://mailman.iro.umontreal.ca/mailman/listinfo/gambit-list
On Sun, Apr 10, 2005 at 09:18:22PM -0500, Bradley Lucier wrote:
Marc:
Shut down one of gambit4-beta or gambit-list, I'm getting tired of getting two copies of all these messages.
Brad
I didn't know about this other list. While monitoring gambit-list@iro.umontreal.ca, I have often felt as though I'm missing half of the conversation. Many questions seem to get no reply, while other messages pop up that appear to be excerpts of a longer thread. The existance of this gambit-beta list surely has something to do with that. Is there an archive of gambit-beta somewhere? I'd like to go back and read through some of the old threads. Also, unless gambit-beta is going to be shut down very soon, I'd like to subscribe. How does one do that? Thanks, Ben
"Marc" == Marc Feeley <feeley@iro.umontreal.ca> writes:
I figure that an OpenGL binding for Gambit would be handy :-) Marc> Yes. Note: Guillaume Germain has written one too. Which one Marc> is the most complete? Maybe you should merge your work.
Marc> Marc A simple google does not reveal anything. Guillaume - if you are reading this list please contact me. Thanks Brian
On Sun, 10 Apr 2005 briand@aracnet.com wrote:
Guillaume - if you are reading this list please contact me.
Hello, I did a simple port of Chicken's OpenGL bindings to Gambit. It's only a port of GL, without GLU or GLUT. I use (very) rudimentary SDL bindings to get my window to draw on. You can get them at the following URL: http://www.iro.umontreal.ca/~germaing/gl-gambit.tar.gz You can test them with a 'make' followed by 'gsi gears.scm'. Guillaume
Thanks very much. I am currently trying to set up my port so that gl and glu/glut stuff are separate libraries. Brian
"Guillaume" == Guillaume Germain <germaing@iro.umontreal.ca> writes:
Guillaume> On Sun, 10 Apr 2005 briand@aracnet.com wrote:
Guillaume - if you are reading this list please contact me.
Guillaume> Hello, Guillaume> I did a simple port of Chicken's OpenGL bindings to Guillaume> Gambit. It's only a port of GL, without GLU or GLUT. I Guillaume> use (very) rudimentary SDL bindings to get my window to Guillaume> draw on. Guillaume> You can get them at the following URL: Guillaume> http://www.iro.umontreal.ca/~germaing/gl-gambit.tar.gz Guillaume> You can test them with a 'make' followed by 'gsi Guillaume> gears.scm'. Guillaume> Guillaume
participants (5)
-
ben@fuhok.net -
Bradley Lucier -
briand@aracnet.com -
Guillaume Germain -
Marc Feeley