cannot link program which uses std::(vector. deque) in SuSE AMDx86_64 
The compiler version is the default which comes with SuSE 9.2. 
gcc (GCC) 3.3.4 (pre 3.3.5 20040809). The same program on SuSE 9.2 
for i386 has no problem linking! 
 
here it is: 
----------- 
#include <iostream> 
using namespace std; 
#include <vector> 
 
int main() 
{ 
    vector<int> qint; 
    int n = 10; 
    int i; 
    for (i = 0; i < n; i++) 
    { 
        qint.push_back(i); 
    } 
 
    for (i = 0; i < n; i++) 
    { 
        cout << "#" << i << " : " << qint[i] << "\n"; 
    } 
    return 0; 
} 
 
#g++ testdeque.cc -o run 
========================= 
/tmp/ccH7d61t.o(.gnu.linkonce.t._ZNSt14__simple_allocIiSt24__default_alloc_templateILb1ELi0EEE10deallocateEPim+0x28):
 
In function `std::__simple_alloc<int, std::__default_alloc_template<(bool)1, 
(int)0> >::deallocate(int*, unsigned long)': 
: undefined reference to `std::__default_alloc_template<(bool)1, (int)
0>::deallocate(void*, unsigned long)' 
/tmp/ccH7d61t.o(.gnu.linkonce.t._ZNSt14__simple_allocIiSt24__default_alloc_templateILb1ELi0EEE8allocateEm+0x28):
 
In function `std::__simple_alloc<int, std::__default_alloc_template<(bool)1, 
(int)0> >::allocate(unsigned long)': 
: undefined reference to `std::__default_alloc_template<(bool)1, (int)
0>::allocate(unsigned long)' 
collect2: ld returned 1 exit status

-- 
           Summary: cannot link program which uses std::(vector. deque) in
                    SuSE AMDx86_64
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dkouroun at cc dot uoi dot gr
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20559

Reply via email to