Dear Thomas, Thank you for your kind reply. I am very novice, so please allow me to explain my problem:
The basic problem is that I have a gl-routines.lisp file, which calls libGL.so and libX11.so I don't know how to call system libraries from cmucl, so I fish around and find that Knut Erstad has kindly provided a cmucl-interface.lisp along with gl-bindings.lisp that does this. if I load cmucl-interface.lisp, gl-bindings.lisp, and gl-routines.lisp; place (load-foreign) calls in the entry routine to load the libGL.so and libX11.so, everything works fine. I can save a core with ext:save-lisp and then use that core. However, the un-compiled version is very slow, and if I compile the files, then gl-bindings.x86f and gl-routines.x86f won't load in cmucl. they would complain that they don't know where gl*() functions are. so I have to first load the libraries. now they will load and will work, but the core image will crash with a segmentation error. Michael Naunton has kindly instructed me to add an :init-function and load the libraries there, but the function should also load every file that uses those libraries. this defeats the purpose of a core image. I wonder if there is a compiler switch or something that would let the compiled files load, but the libraries could be loaded later in the :init-function so that the C heap problem you mentioned won't occur. Thank you again, Best Regards, Balto. ----- Original Message ----- From: "Thomas Fischbacher" <[EMAIL PROTECTED]> To: "R Alemi" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, March 31, 2004 1:57 PM Subject: Re: Core image and gl bindings > > On Wed, 31 Mar 2004, R Alemi wrote: > > > > > Dear List Members, > > I need to use opengl with cmucl, and I have installed the cmucl-xlib-and-gl > > extensions > > provided by Knut Arild Erstad. it works fine, but when I save a core image > > with > > extensions:save-lisp, I get a segmentation error when I try to recall the > > image. > > Hm, I'm doing similar things with an extension of clg (GTK bindings) and > the libgtkglarea widget... > > > Has anyone had this problem, or know how to solve it? > > Quite in general, when you use the alien interface and use data > structures on the C heap, these cannot be serialized into the core file, > for obvious reasons. > > -- > regards, [EMAIL PROTECTED] (o_ > Thomas Fischbacher - http://www.cip.physik.uni-muenchen.de/~tf //\ > (lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y) V_/_ > (if (= x 0) y (g g (- x 1) (* x y)))) n 1)) (Debian GNU) >
