Re: broken c++?

2002-08-19 Thread Kyle Butt

Josef Karthauser wrote:
> Is it just me or is libstdc++ linking broken on -current right now?
> 
> Kde3 complains:
> 
> c++ -DNDEBUG -DNO_DEBUG -O2 -O -pipe -march=pentiumpro -fmemoize-lookups
> -fsave-memoized -fno-exceptions -fno-check-new -DQT_CLEAN_NAMESPACE
> -DQT_NO_COMPAT -DQT_NO_ASCII_CAST -o kappfinder -pthread main.o
> scanner.o checker.o kappfinder_meta_unload.o -Wl,-export-dynamic
> -L/usr/X11R6/lib -L/usr/local/lib /usr/local/lib/libkdeui.so
> /usr/local/lib/libkdecore.so -L/usr/lib /usr/local/lib/libDCOP.so
> /usr/local/lib/libkdefx.so -lqt-mt -lpng -lz -lXext -lX11 -lSM -lICE
> -lXrender -lstdc++ -lm -lgcc -ljpeg -Wl,--rpath -Wl,/usr/local/lib
> -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/X11R6/lib
> checker.o: In function `checkDesktopFile(QString const&, QString)':
> checker.o(.text+0x53e): undefined reference to `cout'
> checker.o(.text+0x54b): undefined reference to `ostream::operator<<(char const*)'
> checker.o(.text+0x57d): undefined reference to `ostream::operator<<(char const*)'
> checker.o(.text+0x58d): undefined reference to `ostream::operator<<(char const*)'
> checker.o(.text+0x6f9): undefined reference to `cout'
> checker.o(.text+0x706): undefined reference to `ostream::operator<<(char const*)'
> checker.o(.text+0x70e): undefined reference to `endl(ostream&)'
> checker.o(.text+0x7e9): undefined reference to `cout'
> checker.o(.text+0x7f2): undefined reference to `ostream::operator<<(char const*)'
> checker.o(.text+0x7fa): undefined reference to `endl(ostream&)'
> 
> My own app complains:
> 
> g++ -g -gstabs+ -D__WXGTK__ -I/usr/X11R6/include -Wall -o Ostberger
> GeoCube.o GeoCurve.o GeoMCircle.o GeoWorld.o GeometricCanvas.o MyFrame.o
> Ostberger.o graphics_prims.o time_routines.o curve.o description.o law.o
> lawworld.o vector.o -L/usr/X11R6/lib -lwx_gtk -lwx_gtk_gl -lGL -lGLU
> -lglut
> /usr/X11R6/lib/libwx_gtk.so: warning: mktemp() possibly used unsafely;
> consider using mkstemp()
> GeoWorld.o: In function `law::type_string()':
> /home/joe/Ostberger/src/Ostberger-mk2/law.h:108: undefined reference to `cout'
> /home/joe/Ostberger/src/Ostberger-mk2/law.h:109: undefined reference to
> `ostream::operator<<(char const*)'
> /home/joe/Ostberger/src/Ostberger-mk2/law.h:109: undefined reference to
> `ostream::operator<<(int)'
> 
> etc.
> 
> Joe


yeah, this is a legacy header problems the newer X.h c++ files get 
installed in /usr/include/g++/legacy IIRC.

rm -rf /usr/include/g++
cd /usr/src
make includes

worked for me. YMMV

Kyle


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: broken c++?

2002-08-19 Thread Josef Karthauser

On Mon, Aug 19, 2002 at 11:12:54AM -0400, Alexander Kabaev wrote:
> Hi Josef,
> 
> On Mon, 19 Aug 2002 13:22:52 +0100
> Josef Karthauser <[EMAIL PROTECTED]> wrote:
> 
> > Is it just me or is libstdc++ linking broken on -current right now?
> Remove /usr/include/g++ before making your next installworld.

Thanks that did the trick, for both examples.

Joe
-- 
"As far as the laws of mathematics refer to reality, they are not certain;
and as far as they are certain, they do not refer to reality." - Albert
Einstein, 1921

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: broken c++?

2002-08-19 Thread Alexander Kabaev

Hi Josef,

On Mon, 19 Aug 2002 13:22:52 +0100
Josef Karthauser <[EMAIL PROTECTED]> wrote:

> Is it just me or is libstdc++ linking broken on -current right now?
Remove /usr/include/g++ before making your next installworld.

-- 
Alexander Kabaev

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: broken c++?

2002-08-19 Thread Erik Greenwald

On Mon, Aug 19, 2002 at 04:53:08PM +0200, Jan Stocker wrote:
> 
> > 
> > for your own code, you seem to lack -lstdc++ 
> 
> This shouldn't be the prob...
> You never have to add -lstdc++ by hand... using g++ to link has to
> include it by itself.

yeah... I just did a little experimenting, seems to be a namespace
issue. So if you're going to use 'cout', remember to either put
"std::cout" or "using namespace std;" in your code... (damn I hate c++)

at one point, hand-adding -lstdc++ fixed problems like this, I can't
seem to reproduce it so it may have been a bug or something, I don't
know :)

-- 
-Erik <[EMAIL PROTECTED]> [http://math.smsu.edu/~erik]

The opinions expressed by me are not necessarily opinions. In all probability,
they are random rambling, and to be ignored. Failure to ignore may result in
severe boredom or confusion. Shake well before opening. Keep Refrigerated.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: broken c++?

2002-08-19 Thread Jan Stocker


> 
> for your own code, you seem to lack -lstdc++ 

This shouldn't be the prob...
You never have to add -lstdc++ by hand... using g++ to link has to
include it by itself.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: broken c++?

2002-08-19 Thread Erik Greenwald

On Mon, Aug 19, 2002 at 01:22:52PM +0100, Josef Karthauser wrote:
> Is it just me or is libstdc++ linking broken on -current right now?
> 

I was able to compile kde3 yesterday ... you may have an old C++ header
in place which causes namespace issues. try removing them and doing the
installworld thing again?

for your own code, you seem to lack -lstdc++ 



-- 
-Erik <[EMAIL PROTECTED]> [http://math.smsu.edu/~erik]

The opinions expressed by me are not necessarily opinions. In all probability,
they are random rambling, and to be ignored. Failure to ignore may result in
severe boredom or confusion. Shake well before opening. Keep Refrigerated.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message