[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Gcl-devel] Re: How to link object files generated by GCL
From: |
Bill Page |
Subject: |
RE: [Gcl-devel] Re: How to link object files generated by GCL |
Date: |
Mon, 12 Mar 2007 14:56:46 -0400 |
On March 12, 2007 1:15 PM Camm Maguire wrote:
>
> gcl
> >(load "foo.o")
> >(si::save-system "my-executable")
>
Camm, I believe that question here was how to call a Lisp
function from C main program, not how to link a C object
file into Lisp.
Regards,
Bill Page.
> Take care,
>
> address@hidden 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, address@hidden 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
> address@hidden
> ==============================================================
> ============
> "The earth is but one country, and mankind its citizens." --
> Baha'u'llah
>
>
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gcl-devel
>
>