[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with automake/libtool combination
From: |
sdeepak |
Subject: |
Problem with automake/libtool combination |
Date: |
Tue, 31 Jul 2001 14:11:12 +0530 |
Hello !
I'm having a problem with libtool/automake. I'm a newbie at this and hope
to get some pointers.
If this is not the group where I should be asking this, could somebody tell
me the right group ?
I?m using the Autotools to build a software.
First I have to build a shared library from the sources present in a
directory.
I have used the LTLIBRARIES primary for this in the Makefile.am.
The libtool commands generated as a result are ?
-----
c++ -DPACKAGE=\"libomni\" -DVERSION=\"1\" -I. -I. -DUSE_DYNAMIC_LINKING=1
-I/usr/lib/glib/include -g -O2 -Wp,-MD,.deps/DeviceInstance.pp -c
DeviceInstance.cpp -fPIC -DPIC -o .libs/DeviceInstance.lo
c++ -DPACKAGE=\"libomni\" -DVERSION=\"1\" -I. -I. -DUSE_DYNAMIC_LINKING=1
-I/usr/lib/glib/include -g -O2 -Wp,-MD,.deps/DeviceInstance.pp -c
DeviceInstance.cpp -o DeviceInstance.o >/dev/null 2>&1
mv -f .libs/DeviceInstance.lo DeviceInstance.lo
-------
I use the library thus built later to link with other executables and
libraries.
But, I?m getting errors that some symbol references are not resolved.
However, if I use the libtool directly (without Automake/Makefile.am coming
into picture), I am able to generate a shared library which has no problems
of unresolved symbol references.
I give a plain libtool commands like
------
libtool gcc ?c DeviceInstance.cpp
(and some more similar commands to compile other source files?)
Then?
libtool gcc ?rpath /usr/local/lib ?o libomni.la *.lo
-------
The futher commands automatically generated by libtool in this case are
-------
rm -f .libs/DeviceInstance.lo
c++ -c -I /usr/lib/glib/include DeviceInstance.cpp -fPIC -DPIC -o
.libs/DeviceInstance.lo
c++ -c -I /usr/lib/glib/include DeviceInstance.cpp -o DeviceInstance.o
>/dev/null 2>&1
mv -f .libs/DeviceInstance.lo DeviceInstance.lo
(and so on)
-------
I will be glad if I could get the following clarified
1. Why does the error occur in the first case ? Pl. note that the shared
library is created, but later when linking with other programs, unresolved
references emerge. So, what options should I use/remove in the first case
to get it to work like the second case ?
2. The .deps/DeviceInstance.pp does not exist (is not created). However,
the dependencies are there in a file called .deps/DeviceInstance.P. Could
there be anything wrong here ?
I would be happy to give more details about my problem? like the
Makefile.am or the source structure etc.
Thanks,
Deepak.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Problem with automake/libtool combination,
sdeepak <=