* How to link agains C++-compiled libraries?
@ 2001-01-22 11:22 Arno Hahma
0 siblings, 0 replies; only message in thread
From: Arno Hahma @ 2001-01-22 11:22 UTC (permalink / raw)
To: tru64-unix-managers
Problem: ld doesn't find objects defined in C++ -compiled shared library.
The problem is apparently, that the mangled names in the library
are different than what ld thinks to look for. This may
be because the software in question defines new C++ classes
based on the ones present in the shared libraries. Then it
tries to link the parent classes from the library, which doesn't
seem to work.
Is there a workaround for this other than linking statically?
Example:
gcc -L/usr/local/qt/lib -rpath /usr/local/qt/lib -o prog <objects> -lqt -lm
Unresolved:
QApplication::QApplication(int &, char **)
QString::QString(char const *)
QFileInfo::QFileInfo(QString const &)
..
..
..
hundreds of lines of complaints.
cxx complains about something different:
ld:
Unresolved:
__4QDirRC7QStringT1ii
__4QDirRC4QDir
__as__4QDirRC4QDir
_$_4QDir
..
..
..
and hundreds of mangled names follow, regardless of, whether the <objects>
were compiled with cxx or gcc.
All symbols are defined libqt.so, if checked with nm.
The compiler/OS versions are:
Compaq C V6.3-129 (dtk) on Digital UNIX V4.0G (Rev. 1530)
Compiler Driver V6.3-126 (dtk) cc Driver
Compaq C++ V6.3-002 for Digital UNIX V4.0G (Rev. 1530)
Compiler Driver V6.3-002 (cxx) cxx Driver
gcc 2.95.2
ArNO
2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-01-22 11:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-22 11:22 How to link agains C++-compiled libraries? Arno Hahma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox