From mboxrd@z Thu Jan 1 00:00:00 1970 From: To: Avi Green Cc: Benjamin Kosnik , libstdc++-v3 Development List , GCC Installation Help List Subject: Re: Case history: Installing libstdc++ on i686-pc-linux-gnu (RedHat) Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: References: <38DFE709.D9B51CBC@sputnik7.com> X-SW-Source: 2000-q1/msg00413.html Message-ID: <20000401000000.TTfoU9E8SgQ5NO7n9RtdCtnErPla9CzOLnWQXTZ8GIE@z> On Mon, 27 Mar 2000, Avi Green wrote: [snip] > plus v3. A simple hello.cpp program generates the following on compile: > > $ g++ -I/usr/libstdc++-2.90.8/include/g++-v3 -L/usr/libstdc++-2.90.8/lib I believe you need to add '-fhonor-std' to your command line. By default, libstdc++-v3 builds with namespace std enabled; that is, -fhonor-std . However, for backwards compatiblity reasons, g++ treats namespace std as the global namespace by default. So if you use 'std::cout' in your code, g++ will generate a reference to 'cout' ... but libstdc++-v3 contains 'std::cout' , *not* 'cout' . > Hello.cpp > /tmp/cc2CbfSP.o: In function `main': > /tmp/cc2CbfSP.o(.text+0x26): undefined reference to `cout' [big long fat snip, including error message and a second question I cannot answer.]