[Ecls-list] Building static programs

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Mon Mar 21 07:48:07 UTC 2011


On Mon, Mar 21, 2011 at 2:54 AM, Jason Cox <jason at coxmountain.com> wrote:

> I'm trying to build a static program.  Although the documentation covers
> building static libraries,
> I can only find how to build programs that are dynamically linked.  I tried
> the following line, but it doesn't work.
>
> (c:build-program "work" :lisp-files '("work.o") :ld-flags '("-static")))
>
> Is there an easy way to do this without building a static library and
> writing my own main() in C?
>

It is not possible to build statically linked programs when ECL has been
built as a shared library. So if you want that feature, build a copy of ECL
using --disable-shared and use that copy to link your program.

I know this is a hack, but building ECL as as statically linked implies
changes all over ECL and right now we do not have a simple way to duplicate
the building process --with and without static libraries.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110321/396d41f2/attachment.html>


More information about the ecl-devel mailing list