public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* simple program which uses std::vector in SuSE 9.2 AMDx86_64 doesn't link
       [not found] <1111080573.24482.ezmlm@gcc.gnu.org>
@ 2005-03-20 18:36 ` Simeon Nifos
  0 siblings, 0 replies; only message in thread
From: Simeon Nifos @ 2005-03-20 18:36 UTC (permalink / raw)
  To: gcc-help

A simple program which uses std::vector does not link
in AMDx86_64 SuSE 9.2 with system's g++ compiler.

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! 

The same problem appears with intel-icc compiler in 
SuSE AMDx86_64 while both compilers behave as they 
were expected to in SuSE 9.2 i386. 

What can I do?
 
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 --verbose
================================== 
Reading specs from
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/specs
Configured with: ../configure --enable-threads=posix
--prefix=/usr --with-local-prefix=/usr/local
--infodir=/usr/share/info --mandir=/usr/share/man
--enable-languages=c,c++,f77,objc,java,ada
--disable-checking --libdir=/usr/lib64 --enable-libgcj
--with-gxx-include-dir=/usr/include/g++
--with-slibdir=/lib64 --with-system-zlib
--enable-shared --enable-__cxa_atexit
x86_64-suse-linux
Thread model: posix
gcc version 3.3.4 (pre 3.3.5 20040809)
 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/cc1plus
-quiet -v -D__GNUC__=3 -D__GNUC_MINOR__=3
-D__GNUC_PATCHLEVEL__=4 -D_GNU_SOURCE testdeque.cc
-D__GNUG__=3 -quiet -dumpbase testdeque.cc -auxbase
testdeque -version -o /tmp/ccomjBwR.s
GNU C++ version 3.3.4 (pre 3.3.5 20040809)
(x86_64-suse-linux)
        compiled by GNU C version 3.3.4 (pre 3.3.5
20040809).
GGC heuristics: --param ggc-min-expand=100 --param
ggc-min-heapsize=131072
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++
 /usr/include/g++/x86_64-suse-linux
 /usr/include/g++/backward
 /usr/local/include
 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/include
 /usr/x86_64-suse-linux/include
 /usr/include
End of search list.

/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../x86_64-suse-linux/bin/as
-V -Qy -o /tmp/ccZvpwNU.o /tmp/ccomjBwR.s
GNU assembler version 2.15.91.0.2 (x86_64-suse-linux)
using BFD version 2.15.91.0.2 20040727 (SuSE Linux)
 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/collect2
--eh-frame-hdr -m elf_x86_64 -dynamic-linker
/lib64/ld-linux-x86-64.so.2 -o run
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../lib64/crt1.o
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../lib64/crti.o
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/crtbegin.o
-L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4
-L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../x86_64-suse-linux/lib
-L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../lib64
-L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../..
-L/lib/../lib64 -L/usr/lib/../lib64/tmp/ccZvpwNU.o
-lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/crtend.o
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../lib64/crtn.o
/tmp/ccZvpwNU.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/ccZvpwNU.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


____________________________________________________________
Do You Yahoo!?
ÁðïΓͺΓ΄ΓžΓ³Γ΄Γ₯ ôç ÀùñΓ₯ΓœΓ­ @yahoo.gr ÀéΓ₯ýèáíóç óÑò óôï http://www.otenet.gr

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-20  9:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1111080573.24482.ezmlm@gcc.gnu.org>
2005-03-20 18:36 ` simple program which uses std::vector in SuSE 9.2 AMDx86_64 doesn't link Simeon Nifos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).