|
From: | Ian Lance Taylor |
Subject: | Re: Problem with linking ununsed symbols in a shared library |
Date: | 04 Apr 2005 15:47:44 -0400 |
User-agent: | Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Shridhar Daithankar <address@hidden> writes: > gcc -I. -c main.c test1.c test2.c > gcc -shared -o libtest1.so test1.o > gcc -shared -o libtest2.so test2.o > gcc -o test -L. -ltest1 main.o > > $ ./compile.sh > ./libtest1.so: undefined reference to `func4' > collect2: ld returned 1 exit status func4 is defined in libtest2.so. You aren't linking against libtest2.so. This is expected behaviour. Why would you expect something different? Ian
[Prev in Thread] | Current Thread | [Next in Thread] |