Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-57

[gcc 4.0.2] explicit instantiation/extern template unsats on symbols defined later

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 4.1.2
    • 4.1.3
    • Build and Installation
    • None
    • gcc 4.0.2

    Description

      Linking with gcc 4.0.2 gives many unsats for member functions of class templates explicitly instantiated in the library. For example:

      gcc -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG -pthreads -D_RWSTD_USE_CONFIG -I/build/sebor/gcc-4.0.2-15s/include -I/build/sebor/dev/stdlib/include -I/build/sebor/dev/stdlib/examples/include -pedantic -nostdinc++ -g -Wall -W -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long /build/sebor/dev/stdlib/examples/tutorial/alg7.cpp

      gcc alg7.o -o alg7 -pthreads -L/build/sebor/gcc-4.0.2-15s/lib -lstd15s -lsupc++ -lm
      Undefined first referenced
      symbol in file
      std::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned int, unsigned int) constalg2.o
      ld: fatal: Symbol referencing errors. No output written to alg2
      collect2: ld returned 1 exit status
      make: *** [alg2] Error 1

      Attachments

        Activity

          People

            sebor Martin Sebor
            sebor Martin Sebor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: