After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 303936 - should use g++ to link with cpp code
should use g++ to link with cpp code
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.8.8
Other Linux
: Normal normal
: 0.8.9
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-05-12 16:58 UTC by Sebastien Bacher
Modified: 2005-05-13 22:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastien Bacher 2005-05-12 16:58:36 UTC
Building with gcc-4.0 and g++-3.3

"cc -shared  .libs/libgsttrm_la-gsttrm.o  -L/usr/lib -pthread
/usr/lib/libgstreamer-0.8.so -lmusicbrainz -lstdc++ -lm  -Wl,--export-dynamic
-Wl,-soname -Wl,libgsttrm.so -Wl,-version-script -Wl,.libs/libgsttrm.ver -o
.libs/libgsttrm.so
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
make[3]: *** [libgsttrm.la] Error 1"

according to a discussion, with a Debian/Ubuntu maintainer, on IRC:

"The problem is you're using "gcc -lstdc++" which is a) wrong, and b) won't work
when gcc and g++ are mismatched (as they currently are in breezy, 4.0 versus 3.3)
...
If they're pure C applications linking with C++ libs, link with g++."
Comment 1 David Schleef 2005-05-12 20:06:27 UTC
This is a problem with libtool, although one with a simple workaround.  One can
create an empty file (don't forget the copyright header) called
intentionall-left-blank.c++, add it to libgsttrm_la_SOURCES, and it then links
with g++.
Comment 2 Tim-Philipp Müller 2005-05-13 22:05:36 UTC
2005-05-13  Tim-Philipp Müller  <tim at centricular dot net>

	* ext/musicbrainz/Makefile.am:
	* ext/musicbrainz/blank-file.cpp:
	  Add empty .cpp file to make libtool use g++ for the
	  linking instead of gcc (fixes #303936).