This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

g++ linking problem


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I see other messages similar to this in the mailing list,
but I don't see any resolution yet.

I am having a problem linking C++ programs.
(I have attached the logs from compiling MySQL and KDE arts.)
The programs compile just fine, but when it tries to link
them, it fails to find all basic C++ symbols, such as those
from libstdc++.  I have libstdc++-v3 installed.
When I use g++ ordinarily, it links to libstdc++ just fine.

Specifically, it can't find:
__cxa_pure_virtual
std::basic_string

I am using:
g++ (GCC) 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)
(I had this problem with gcc 3.4.5 also.)

For MySQL, I was able to work around it by adding
- -lstdc++ to my CFLAGS, but that seems like a bad hack.
(This didn't work for arts.
Maybe it needed the supplemental library too?)
What is the proper way to get C++ to link?
Why would the way the these programs' Makefiles
not be able to link while normal invocations of g++ can?

Any help would be greatly appreciated.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2-ecc0.1.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEguq/xzVgPqtIcfsRAjcPAJ9kpE7KERH10EJQ8VGK4JzZ+2I5BACff4yT
/7AQngAd3i0wbBIS+jRCQ/w=
=Qu7H
-----END PGP SIGNATURE-----

Attachment: log.tar.bz2
Description: BZip2 compressed data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]