This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
C library in C++
- From: "Debamitro Chakraborti" <tatai123 at rediffmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: 15 Aug 2003 14:07:34 -0000
- Subject: C library in C++
- Reply-to: "Debamitro Chakraborti" <tatai123 at rediffmail dot com>
I need help on the following issue.
I am building a C++ application in Qt which also needs another
static library
libxxx.a (i'm generalising).
The trouble is when I link, g++ finds 'undefined reference' for
every function called from that static library.
I think the problem lies in the fact that the static library is
written in C
and my own code is in C++.
My linking lines are (I've tried several):
g++ -L$QTDIR/lib ... libxxx.a -lqt -lm
g++ -L$QTDIR/lib -L. ... -lqt -Wl,-Bstatic -lxxx -lm
g++ -L$QTDIR/lib -L. ... -lqt -Wl,-Bstatic libxxx.a -lm
all yield the same linking errors
The static library works perfectly well in any C app.
Is there any way to convert it to C++?
Is there any way out?
Another thing, I don't have the source code to the library, so I
can't modify that and rebuild it.
Debamitro
___________________________________________________
Meet your old school or college friends from
1 Million + database...
Click here to reunite www.batchmates.com/rediff.asp