Re: How to link object files generated by GCL



Greetings!

gcl
(load "foo.o")
(si::save-system "my-executable")

Take care,

mnt.hda@xxxxxxxxx writes:

I'm actually having hell doing this myself!

I'm trying to have a Lisp function compiled down to something I can
address in C. My biggest issue so far is getting the GCL .o file to
link in properly with my C binary. Calling "nm" on the GCL object file
reveals a number of unlinked symbols:

U call_or_link
U do_init
00000000 T init_code
00000020 t L1
00000008 d Lnk0
00000100 t LnkT0
U number_compare
U number_minus
U number_times
U small_fixnum_table
U vs_base
U vs_limit
U vs_overflow
U vs_top
00000000 d VVi

but I have no idea where these come from. I assume they're provided by
something in GCL.

Does anyone know what file I must link in with this to get this to
compile?

Many thanks!

Jay P.

On Mar 5, 6:06 pm, themikeste...@xxxxxxxxx wrote:
Hi all,
I've been trying to write a lisp function that will compile down
to a native function that can be called from C. I'm wanting to find a
way to extend the ruby language with lisp, and in order to do this I
will have to write some C wrapper code around the lisp code. I have
read that GCL supports compiling lisp code down to native machine code
and this is exactly what I'm looking for, however when I compile the
lisp code with GCL it creates an object file. Now I know that the
object file can be loaded by GCL but this is not what I am wanting to
do, I want to find out what that object file needs to be linked
against so that I can call the compiled lisp function from a seperate
C program that will be used as a wrapper. Does anyone know how to do
this? I have been searching for an answer but it seems that every time
someone asks this question he is never answered but rather told to
just save an image of gcl to produce an executable, however this is
not what I seek to do. If anyone has any insight as to this problem
please let me know.

Thanks,
Mike M.



--
Camm Maguire camm@xxxxxxxxxxxx
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
.



Relevant Pages

  • Re: How to link object files generated by GCL
    ... I'm trying to have a Lisp function compiled down to something I can ... My biggest issue so far is getting the GCL .o file to ... I've been trying to write a lisp function that will compile down ...
    (comp.lang.lisp)
  • Re: compiling lisp with GCL
    ... EW> Can someone point me to some documentation on how to compile Lisp to ... EW> C using GCL; I have looked everywhere and can not find ... EW> Lisp programs to C and can not find any documentation anywhere. ...
    (comp.lang.lisp)
  • How to link object files generated by GCL
    ... I've been trying to write a lisp function that will compile down ... will have to write some C wrapper code around the lisp code. ...
    (comp.lang.lisp)
  • Re: Compiling to an EXE File
    ... > I have been trying to figure out how to compile lisp to a native ... > executable file on Windows, but so far, I can't figure out how. ... > hello.o, but I'm not sure how to get these to compile, as they give ... from GCL is to simply call the function SYSTEM:SAVE-SYSTEM. ...
    (comp.lang.lisp)
  • Re: Program compression
    ... TM> supported by your favorite language (LISP) are good concepts. ... then call the Java compiler to compile that source file to a Class ... TM-STC> Since static type checking makes run-time type checks unnecessary, ...
    (comp.programming)