[Gc] Problems again with built libs ;-(

Jeff Sturm jsturm@one-point.com
Mon, 9 Dec 2002 12:00:36 -0500 (EST)


On Mon, 9 Dec 2002, Linuxhippy wrote:
> clemi@cc02eiss:~/Kompilieren/gc6.1/tests> gcc -o test -I ../include/
> ../.libs/libgc.so.1.0.1  test.c
> ../.libs/libgc.so.1.0.1: undefined reference to `dlopen'

You may need -ldl also, e.g.:

gcc test.c -L. -lgc -ldl -o gctest

> clemi@cc02eiss:~/Kompilieren/gc6.1/tests> gcc -o test -I ../include/
>   ../.libs/libgc.a test.c

Order is important.  Try placing libraries last on the command line.

Jeff