multi lib linking problem
Christian Couder
Christian.Couder at fr.alcove.com
Fri Apr 6 14:29:47 BST 2001
On Fri, Apr 06, 2001 at 03:03:57PM +0200, Alexei Matiouchkine wrote:
> Hi, all.
> I've got the following strange problem, using kDevelop 1.4.
> I built the simple c++ project from the scratch, that have an amount of
> subdirs added. In all these dirs, the corresponding .a libraries are created
> without any problem (let's call them lib1.a, lib2.a).
> But than, when the main program is about to be linked:
>
> bin/sh ../libtool --mode=link g++ -O3 -Wall -o main main.o lib1.a lib2.a
> g++ -O3 -Wall -o main main.o lib1.a lib2.a
> /path/lib1.a(file1.o): In function func1()':
> file1.o(.text+0xfbe): undefined reference to `func2'
>
> considering, the func1 came from lib1 and func2 - from lib2 respectively, can
> somebody say me, what linker flag (or whatever else) have I missed???
Hi,
Did you try something like
nm -C lib2.a | grep func2
to check that func2 is in lib2.a ?
Do you get a 'T' with nm or a 'U' (like undefined) for func2 ?
Are you sure the signatures of the function func2 match in the header
and source files where it is declared, defined and used ?
Do you use templates ? Are you sure all your templates are implemented ?
What flags did you use to create and compile file1, file2, lib1 and lib2
?
Regards,
Christian.
-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop
mailing list