From: David Dreisigmeyer <[email protected]>
Subject: Re: [Chicken-users] Undefined symbols: _C_toplevel (OS X 10.6.6 / 
Chicken 4.6.0)
Date: Sat, 15 Jan 2011 12:00:43 -0500

> Also, if I use this Makefile:
> 
> CC = gcc-4.2
> CHICKEN_LIB = /usr/local/lib
> LIB = /usr/lib
> CHICKEN_INC = /usr/local/include
> 
> all:
>       $(CC) -fPIC -g -c -m64 -I$(CHICKEN_INC) cython_chicken.c
>       $(CC) -dynamiclib -m64 -L$(LIB) -lm -o libcython_chicken.dylib 
> cython_chicken.o
>       
> I get this instead:
> 
> Undefined symbols:
>   "_CHICKEN_eval_string_to_string", referenced from:
>       _eval in cython_chicken.o
>   "_CHICKEN_run", referenced from:
>       _setup in cython_chicken.o
>   "_C_toplevel", referenced from:
>       _setup in cython_chicken.o

You have to link with -lchicken here.

> 
> So where is C_toplevel defined?

In user-defined code. If you just want to initialize the runtime,
without embedded your own compiled Scheme file, use CHICKEN_default_toplevel.


cheers,
felix

_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to