Thread: gcc 3.2 & linking

  1. #1
    Registered User
    Join Date
    Aug 2002
    Posts
    351

    gcc 3.2 & linking

    I have been using my redhat 8.0 box for some coding because of certain requirements.

    Now redhat 8.0 uses gcc3.2 etc. And I'm having trouble linking libraries that require libstdc++ and compat-libstdc++. Particularly, compiling STLport libraries that someone has used in their code.

    Lots of 'undefined references' to __throw and other error handling functions. Are these ones that C++ provide?

    So, my question are:

    Is gcc3.2 etc fully backward compatible?
    Are my linking problems due to paths that are different in the 8.0 distro?
    Is there a problem because STLport is distributed as a binary?

  2. #2
    Registered User
    Join Date
    Aug 2002
    Posts
    351
    something like this. This isn't my code. It compiles OK on redhat 7.2/gcc 2.96.

    All associated static and dynamic libraries are in /usr/lib.

    Code:
    gcc -DNDEBUG -O3 -s -L/lib -L/usr/lib -L. -lstlport_gcc -luuid -lpthread -lxml2 -ldb_cxx -lstdc++ -lcurl test.c -lmyclient -o test
    
    ...
    
    myclientimpl.o(.text+0xbef6): undefined reference to `__cp_pop_exception'
    myclientimpl.o(.text+0xbf38): undefined reference to `__eh_rtime_match'
    myclientimpl.o(.text+0xbf48): undefined reference to `__start_cp_handler'
    myclientimpl.o(.text+0xbfb1): undefined reference to `__throw'
    myclientimpl.o(.text+0xbfd4): undefined reference to `__builtin_delete'
    myclientimpl.o(.text+0xbfe6): undefined reference to `_STL::__node_alloc<true, 0>::_M_deallocate(void *, unsigned int)'
    myclientimpl.o(.text+0xc001): undefined reference to `__cp_pop_exception'
    myclientimpl.o(.text+0xc011): undefined reference to `__throw'
    libstdc++ etc to blame?

    Sorry changed g++ to gcc. Using g++, however, has the same effect.
    Last edited by rotis23; 06-23-2003 at 10:22 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. gcc compiling and linking problem
    By maven in forum C Programming
    Replies: 6
    Last Post: 11-14-2008, 05:28 AM
  2. gcc - linking to cwd
    By mike_g in forum Tech Board
    Replies: 3
    Last Post: 08-15-2008, 03:38 PM
  3. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  4. Replies: 4
    Last Post: 09-02-2007, 08:47 PM
  5. Linking an assembly routine into a GCC project
    By huh in forum C++ Programming
    Replies: 3
    Last Post: 11-21-2002, 03:14 PM