[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Problem with static compile
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] Problem with static compile |
Date: |
Sun, 28 Aug 2005 16:15:16 +0200 |
On 8/28/05, Eric Merritt <address@hidden> wrote:
> I am having a problem trying to get a small example program to compile
> statically. This seems to follow the what is shown in the wiki. This
> is just a simple test program, I am more interested in how to
> statically compile a program that makes use of eggs. Following is the
> output from my attempts.
>
>
>
> % csc main.scm -static -uses srfi-17 -uses bb
>
> main.o(.text+0x60d): In function `f_31':
> /home/emerritt/small-1.0/src/main.c:139: undefined reference to
> `C_srfi_17_toplevel'
> main.o(.text+0x6b9): In function `f_34':
> /home/emerritt/small-1.0/src/main.c:151: undefined reference to
> `C_bb_toplevel'
> collect2: ld returned 1 exit status
> *** Shell command terminated with exit status 1: gcc -o main main.o
> /home/emerritt/local/lib/libchicken.a -L/home/emerritt/local/lib
> -Wl,-R/home/emerritt/local/lib -static -ldl -lm
>
You have to compile and link units for bb and srfi-17.
Since bb needs a couple of extra options and additional files,
a bit of fiddling is required. The best is to take a look at the
bb.setup and srfi-17.setup files and continue from the to
compile the different parts. The `-extension' option can also
be used to simplify the process (slightly).
If you can wait one or two days, I can provide you with a complete
example, ok?
cheers,
felix