[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#101223: Undefined reference to 'cout'



I am unable to reproduce this in unstable with 2.95.4-0.010604.

Gordon Sadler writes:
 > Package: g++-2.95
 > Version: 1:2.95.4-0.010604
 > Severity: important
 > 
 > I have no idea when this started. Perhaps a packaging bug?
 > 
 > If you compile the attached 'hello' program:
 > g++ -v bar.cpp
 > Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
 > gcc version 2.95.4 20010604 (Debian prerelease)
 >  /usr/lib/gcc-lib/i386-linux/2.95.4/cpp0 -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Acpu(i386)
 >  -Amachine(i386) -Di386 -D__i386 -D__i386__ bar.cpp /tmp/ccf6bars.ii
 >  GNU CPP version 2.95.4 20010604 (Debian prerelease) (i386 Linux/ELF)
 >  #include "..." search starts here:
 >  #include <...> search starts here:
 > /usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3
 > /usr/lib/gcc-lib/i386-linux/2.95.4/include
 > /usr/include
 > End of search list.
 > The following default directories have been omitted from the search path:
 > /usr/lib/gcc-lib/i386-linux/2.95.4/../../../../i386-linux/include
 > End of omitted list.
 > /usr/lib/gcc-lib/i386-linux/2.95.4/cc1plus /tmp/ccf6bars.ii -quiet -dumpbase bar.cc -version -o /tmp/ccqPnv88.s
 > GNU C++ version 2.95.4 20010604 (Debian prerelease) (i386-linux) compiled by GNU C version 2.95.4 20010604 (Debian prerelease).
 > as -V -Qy -o /tmp/ccBAeHI5.o /tmp/ccqPnv88.s
 > GNU assembler version 2.11.90.0.7 (i386-linux) using BFD version 2.11.90.0.7
 > /usr/lib/gcc-lib/i386-linux/2.95.4/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/i386-linux/2.95.4/crtbegin.o -L/usr/local/kde2.2/lib -L/usr/local/qt2.3/lib -L/usr/local/lib -L/usr/lib/gcc-lib/i386-linux/2.95.4 /tmp/ccBAeHI5.o -lstdc++ -lm -lgcc -lc -lgcc /usr/lib/gcc-lib/i386-linux/2.95.4/crtend.o /usr/lib/crtn.o
 > /tmp/ccBAeHI5.o: In function `main':
 > /tmp/ccBAeHI5.o(.text+0xf): undefined reference to `cout'
 > /tmp/ccBAeHI5.o(.text+0x14): undefined reference to `ostream::operator<<(char const *)'
 > collect2: ld returned 1 exit status
 > 
 > I've tried different versions (using namespace std, std::cout, cout) 
 > None of them will link here, same error for all. When compiled with
 > g++-3.0 I have no problems.
 > 
 > *** bar.cpp
 > #include <iostream>
 > 
 > int main ()
 > {
 >   std::cout << "hello ...\n";
 >   return 0;
 > }
 > 
 > 
 > -- System Information
 > Debian Release: testing/unstable
 > Architecture: i386
 > Kernel: Linux debian-home 2.2.19 #1 Sat May 19 16:25:04 CDT 2001 i686
 > Locale: LANG=en_US, LC_CTYPE=en_US
 > 
 > Versions of packages g++-2.95 depends on:
 > ii  g++                    1:2.95.4-1        The GNU C++ compiler.             
 > ii  gcc-2.95               1:2.95.4-0.010604 The GNU C compiler.               
 > ii  libc6                  2.2.3-6           GNU C Library: Shared libraries an
 > ii  libstdc++2.10-dev      1:2.95.4-0.010604 The GNU stdc++ library (developmen
 > 
 > -- 
 > Gordon Sadler
 > 
 > 
 > 
 > --  
 > To UNSUBSCRIBE, email to debian-gcc-request@lists.debian.org
 > with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: