chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Distributing compiled C files


From: Ivan Raikov
Subject: [Chicken-users] Distributing compiled C files
Date: Wed, 26 Dec 2007 11:09:52 +0900
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

The example from the manual in section "Distributing compiled C
files" does not seem to work in Chicken 2.732:

   $ make -f Makefile.hello

   csc  hello.scm -O -d2 -v -I lib -DC_ENABLE_PTABLES -DHAVE_GRP_H 
    -explicit-use -t -uses library -static /usr/bin/chicken 
    hello.scm -output-file hello.c -feature chicken-compile-static 
    -quiet -optimize-level 1 -debug-level 2 -include-path lib 
    -feature C_ENABLE_PTABLES -feature HAVE_GRP_H -explicit-use 
    -uses library

   cc hello.c lib/library.c lib/runtime.c -o hello -lm  
      -DC_ENABLE_PTABLES -DHAVE_GRP_H

   $ ./hello 
    
    `##sys#error-hook' is not defined - the `library' unit
    was probably not linked with this executable - execution
    terminated

    provide     <--


Even though library.c and runtime.c are included, apparently the
Chicken runtime system is not initialized. Any guesses as to what
might be wrong?

Here is the Makefile  I used:

Makefile.hello:

CSC = csc
CSCFLAGS = -O -v -I lib -DC_ENABLE_PTABLES -DHAVE_GRP_H -explicit-use

all: hello

hello: hello.c lib/library.c lib/runtime.c
        $(CC) $^ -o $@ -lm  -DC_ENABLE_PTABLES -DHAVE_GRP_H 

hello.c: hello.scm
        $(CSC)  $^ $(CSCFLAGS) -t -uses library -static




reply via email to

[Prev in Thread] Current Thread [Next in Thread]