logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Linker error

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support
View previous topic :: View next topic  
Author Message
wolfcastle



Joined: 09 Aug 2006
Posts: 1

PostPosted: Wed Aug 09, 2006 11:42    Post subject: Linker error Reply with quote

Hello,

while compiling nwnx2 (Version 2.5.3) I get the following linker errors on a AMD 64 Bit Suse (-mcpu=athlon and -m32 are set):

Quote:

g++ -mcpu=athlon -m32 -c -o nwnx2lib.o nwnx2lib.cpp
g++ -mcpu=athlon -m32 -c -o NWNXBase.o NWNXBase.cpp
g++ -mcpu=athlon -m32 -c -o gline.o gline.cpp
g++ -w -fPIC -shared -W -Wall -o nwnx2.so nwnx2lib.o NWNXBase.o gline.o -ldl -DHAVE_CONFIG_H
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/bin/ld: warning: i386 architecture of input file `nwnx2lib.o' is incompatible with i386:x86-64 output
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/bin/ld: warning: i386 architecture of input file `NWNXBase.o' is incompatible with i386:x86-64 output
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/bin/ld: warning: i386 architecture of input file `gline.o' is incompatible with i386:x86-64 output
nwnx2lib.o(.gnu.linkonce.t._ZNSt14__simple_allocISt13_Rb_tree_nodeISt4pairIKSsP9CNWNXBaseEESt24__default_alloc_templateILb1ELi0EEE8allocateEj+0x23): In function `std::__simple_alloc<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, CNWNXBase*> >, std::__default_alloc_template<(bool)1, (int)0> >::allocate(unsigned)':
nwnx2lib.cpp: undefined reference to `std::__default_alloc_template<(bool)1, (int)0>::allocate(unsigned)'
nwnx2lib.o(.gnu.linkonce.t._ZNSt14__simple_allocISt13_Rb_tree_nodeISt4pairIKSsSt3mapISsSsSt4lessISsESaIS1_IS2_SsEEEEESt24__default_alloc_templateILb1ELi0EEE8allocateEj+0x1d): In function `std::__simple_alloc<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >, std::__default_alloc_template<(bool)1, (int)0> >::allocate(unsigned)':
nwnx2lib.cpp: undefined reference to `std::__default_alloc_template<(bool)1, (int)0>::allocate(unsigned)'
nwnx2lib.o(.gnu.linkonce.t._ZNSt14__simple_allocISt13_Rb_tree_nodeISt4pairIKSsP9CNWNXBaseEESt24__default_alloc_templateILb1ELi0EEE10deallocateEPS6_j+0x23): In function `std::__simple_alloc<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, CNWNXBase*> >, std::__default_alloc_template<(bool)1, (int)0> >::deallocate(std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, CNWNXBase*> >*, unsigned)':
nwnx2lib.cpp: undefined reference to `std::__default_alloc_template<(bool)1, (int)0>::deallocate(void*, unsigned)'
nwnx2lib.o(.gnu.linkonce.t._ZNSt14__simple_allocISt13_Rb_tree_nodeISt4pairIKSsSsEESt24__default_alloc_templateILb1ELi0EEE8allocateEj+0x23): In function `std::__simple_alloc<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::__default_alloc_template<(bool)1, (int)0> >::allocate(unsigned)':
nwnx2lib.cpp: undefined reference to `std::__default_alloc_template<(bool)1, (int)0>::allocate(unsigned)'
nwnx2lib.o(.gnu.linkonce.t._ZNSt14__simple_allocISt13_Rb_tree_nodeISt4pairIKSsSt3mapISsSsSt4lessISsESaIS1_IS2_SsEEEEESt24__default_alloc_templateILb1ELi0EEE10deallocateEPSA_j+0x1d): In function `std::__simple_alloc<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >, std::__default_alloc_template<(bool)1, (int)0> >::deallocate(std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >*, unsigned)':
nwnx2lib.cpp: undefined reference to `std::__default_alloc_template<(bool)1, (int)0>::deallocate(void*, unsigned)'
nwnx2lib.o(.gnu.linkonce.t._ZNSt14__simple_allocISt13_Rb_tree_nodeISt4pairIKSsSsEESt24__default_alloc_templateILb1ELi0EEE10deallocateEPS4_j+0x23): In function `std::__simple_alloc<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::__default_alloc_template<(bool)1, (int)0> >::deallocate(std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*, unsigned)':
nwnx2lib.cpp: undefined reference to `std::__default_alloc_template<(bool)1, (int)0>::deallocate(void*, unsigned)'
gline.o(.text+0x9e): In function `gline::parse(char const*)':
gline.cpp: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char, unsigned) const'
gline.o(.text+0xc3):gline.cpp: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::erase(unsigned, unsigned)'
gline.o(.text+0xea):gline.cpp: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned)'
gline.o(.text+0x11d):gline.cpp: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::erase(unsigned, unsigned)'
gline.o(.text+0x143):gline.cpp: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned)'
gline.o(.text+0x1b7):gline.cpp: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_last_of(char, unsigned) const'
gline.o(.text+0x1f9):gline.cpp: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned, unsigned) const'
gline.o(.text+0x2be):gline.cpp: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char, unsigned) const'
gline.o(.text+0x2f1):gline.cpp: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned, unsigned) const'
gline.o(.text+0x363):gline.cpp: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned, unsigned) const'
collect2: ld returned 1 exit status
make: *** [nwnx2.so] Error 1


Maybe someone can help with that. I have no Idea what to do about that.

PS: standard libaries are installed (glibc etc.)
Back to top
View user's profile Send private message
odenien



Joined: 26 Sep 2005
Posts: 37

PostPosted: Sun Aug 13, 2006 14:19    Post subject: Reply with quote

It looks like your linker or your system libraries are 64-bit only. Do a 'file' on the *.o, ld and libc.so.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group