[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libtool (v1.5) does not bind libraries correctly
From: |
Thomas Woerner |
Subject: |
libtool (v1.5) does not bind libraries correctly |
Date: |
Tue, 29 Jul 2003 15:08:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.4) Gecko/20030709 |
Hello,
I have a libtool 1.5 problem - attached is the test case.
libtool-1.4 does the job fine:
$ make -i
cc -c -o test1.o test1.c
cc -c -o test2.o test2.c
libtool --mode=link gcc test1.o test2.o -o libtest.a
mkdir .libs
ar cru libtest.a test1.o test2.o
ranlib libtest.a
gcc -o test test.c -L. -ltest
libtool --mode=link ld test1.o test2.o -o libtest_ld.a
ar cru libtest_ld.a test1.o test2.o
ranlib libtest_ld.a
gcc -o test_ld test.c -L. -ltest_ld
libtool-1.5:
$ make -i
cc -c -o test1.o test1.c
cc -c -o test2.o test2.c
libtool --mode=link gcc test1.o test2.o -o libtest.a
mkdir .libs
ar cru libtest.a
ranlib libtest.a
gcc -o test test.c -L. -ltest
/tmp/cco2JHaj.o(.text+0xa): In function `main':
: undefined reference to `test1'
/tmp/cco2JHaj.o(.text+0x14): In function `main':
: undefined reference to `test2'
collect2: ld returned 1 exit status
make: [test] Error 1 (ignored)
libtool --mode=link ld test1.o test2.o -o libtest_ld.a
libtool: link: unable to infer tagged configuration
libtool: link: specify a tag with `--tag'
make: [libtest_ld.a] Error 1 (ignored)
gcc -o test_ld test.c -L. -ltest_ld
/usr/bin/ld: cannot find -ltest_ld
collect2: ld returned 1 exit status
make: [test_ld] Error 1 (ignored)
The first library is empty, the second one will not be generated at all.
-> no binaries
Thanks in advance,
Thomas Woerner
--
Thomas Woerner, Software Developer Phone: +49-711-96437-0
Red Hat GmbH Fax : +49-711-96437-111
Hauptstaetterstr. 58 Email: address@hidden
D-70178 Stuttgart Web : http://www.redhat.de/
lt_test.tar
Description: Unix tar archive
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- libtool (v1.5) does not bind libraries correctly,
Thomas Woerner <=