#1565 Linker error in deque with -fno-implicit-templates option

OTHER
open
gcc (462)
Bug
none
Unknown
False
2013-02-08
2011-07-20
Sajty
No

I get linker errors with deque, when I use -fno-implicit-templates.
This is working on linux with GCC 4.5.2, but on mingw 4.5.2 it fails.

test.cpp:
#include <deque>
int main()
{
std::deque<int> dq;
return 0;
}

To reproduce, compile it like this:
c:\MinGW\bin>g++ -fno-implicit-templates -c test.cpp
c:\MinGW\bin>g++ test.o
test.o:test.cpp:(.text$_ZNSt5dequeIiSaIiEED1Ev[std::deque<int, std::allocator<in
t> >::~deque()]+0x62): undefined reference to `std::_Deque_base<int, std::alloca
tor<int> >::~_Deque_base()'
test.o:test.cpp:(.text$_ZNSt5dequeIiSaIiEED1Ev[std::deque<int, std::allocator<in
t> >::~deque()]+0x74): undefined reference to `std::_Deque_base<int, std::alloca
tor<int> >::~_Deque_base()'
test.o:test.cpp:(.text$_ZNSt11_Deque_baseIiSaIiEEC2Ev[std::_Deque_base<int, std:
:allocator<int> >::_Deque_base()]+0x21): undefined reference to `std::_Deque_bas
e<int, std::allocator<int> >::_M_initialize_map(unsigned int)'
collect2: ld returned 1 exit status

Discussion

  • Chris Sutcliffe

    Chris Sutcliffe - 2011-12-01
    • labels: 104601 --> gcc
     
  • Earnie Boyd

    Earnie Boyd - 2012-11-12

    This is still occurring with 4.7.0. We should report to gcc bugs; Sajty, can you do that?

     
  • Earnie Boyd

    Earnie Boyd - 2012-11-12
    • assigned_to: nobody --> cstrauss
     
  • Earnie Boyd

    Earnie Boyd - 2013-02-08
    • milestone: --> OTHER
    • type: --> Bug
    • resolution: --> none
    • category: --> Unknown
    • patch_attached: --> False
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks