This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


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

Problems with 2.90.8


I've built gcc-2.95.2 with libstdc++-2.90.8. I tried to compile the
following hello.cc program :

#include <iostream>

int main()
{
    std::cout << "hello, world" << std::endl;
    return 0;
}

and got errors on link stage :


/home/local/roman/g++ -v hello.cc 
Reading specs from /home/roman/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)
/home/roman/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/cpp -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__ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ hello.cc /tmp/ccrIhZhS.ii
GNU CPP version 2.95.2 19991024 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/qt/include
/home/roman/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/../../../../include/g++-v3
/usr/local/include
/home/roman/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/../../../../i686-pc-linux-gnu/include
/home/roman/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:

End of omitted list.
/home/roman/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/cc1plus /tmp/ccrIhZhS.ii -quiet -dumpbase hello.cc -version -o /tmp/ccIQJrlE.s
GNU C++ version 2.95.2 19991024 (release) (i686-pc-linux-gnu) compiled by GNU C version 2.95.2 19991024 (release).
as -V -Qy -o /tmp/ccQe0Wfq.o /tmp/ccIQJrlE.s
GNU assembler version 2.9.1 (i386-slackware-linux), using BFD version 2.9.1.0.25
/home/roman/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /home/roman/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/crtbegin.o -L/home/roman/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2 -L/home/roman/local/lib /tmp/ccQe0Wfq.o -lstdc++ -lm -lgcc -lc -lgcc /home/roman/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/crtend.o /usr/lib/crtn.o
/tmp/ccQe0Wfq.o: In function `main':
/tmp/ccQe0Wfq.o(.text+0x17): undefined reference to `cout'
/tmp/ccQe0Wfq.o(.text+0x1c): undefined reference to `basic_ostream<char, char_traits<char> > & operator<<<char_traits<char> >(basic_ostream<char, char_traits<char> > &, char const *)'
/tmp/ccQe0Wfq.o(.text+0x27): undefined reference to `basic_ostream<char, char_traits<char> >::operator<<(basic_ostream<char, char_traits<char> > &(*)(basic_ostream<char, char_traits<char> > &))'
/tmp/ccQe0Wfq.o: In function `__static_initialization_and_destruction_0':
/tmp/ccQe0Wfq.o(.text+0x5a): undefined reference to `ios_base::Init::Init(void)'
/tmp/ccQe0Wfq.o(.text+0x6e): undefined reference to `ios_base::Init::~Init(void)'
/tmp/ccQe0Wfq.o: In function `basic_ostream<char, char_traits<char> > & flush<char, char_traits<char> >(basic_ostream<char, char_traits<char> > &)':
/tmp/ccQe0Wfq.o(.basic_ostream<char, char_traits<char> > & gnu.linkonce.t.flush<char, char_traits<char> >(basic_ostream<char, char_traits<char> > &)+0xe): undefined reference to `basic_ostream<char, char_traits<char> >::flush(void)'
/tmp/ccQe0Wfq.o: In function `basic_ostream<char, char_traits<char> > & endl<char, char_traits<char> >(basic_ostream<char, char_traits<char> > &)':
/tmp/ccQe0Wfq.o(.basic_ostream<char, char_traits<char> > & gnu.linkonce.t.endl<char, char_traits<char> >(basic_ostream<char, char_traits<char> > &)+0x18): undefined reference to `basic_ios<char, char_traits<char> >::widen(char) const'
/tmp/ccQe0Wfq.o(.basic_ostream<char, char_traits<char> > & gnu.linkonce.t.endl<char, char_traits<char> >(basic_ostream<char, char_traits<char> > &)+0x2a): undefined reference to `basic_ostream<char, char_traits<char> >::put(char)'
collect2: ld returned 1 exit status


What's the problem ? gcc was configured with --enable-haifa
--enable-threads=posix --prefix=/home/roman/local switches (I've built
all the languages); the system in use is Linux, kernel 2.2.13, glibc 2.1.2


-- 
 							With regards, Roman.


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