www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - Undefined symbols using stlport map

↑ ↓ ← Dimitri Kaparis <Dimitri_member pathlink.com> writes:
Greetings,

I have encountered the following problem: when using the map class from stlport
(and these seem to be functions defined in stl\_tree.h), when building from the
IDDE, I get the following errors on linking:

Error: D:\MYPROJECTS\TEST\Main.OBJ(Main)  (1293653086): Symbol Undefined
?_M_increment ?$_Rb_global _N  SAPAU_Rb_tree_node_base  PAU2  Z
Error: D:\MYPROJECTS\TEST\Main.OBJ(Main)  (1293653086): Symbol Undefined
?_M_decrement ?$_Rb_global _N  SAPAU_Rb_tree_node_base  PAU2  Z
Error: D:\MYPROJECTS\TEST\Main.OBJ(Main)  (1293653086): Symbol Undefined
?_Rebalance ?$_Rb_global _N  SAXPAU_Rb_tree_node_base  AAPAU2  Z

The same file builds successfully from the command line, even without specifying
the stlport static lib (this seems to be required only when using streams).
It also builds successfully if I include the dynamic version of the library
instead of the static one in the IDDE.
Any ideas?

Thanks,
Dimitri

http://www.universalstudyhelper.com
Universal Study Helper - the quick and easy way to learn any subject
Sep 12 2002
↑ ↓ Christof Meerwald <cmeerw web.de> writes:
On Thu, 12 Sep 2002 21:24:51 +0000 (UTC), Dimitri Kaparis wrote:
 I have encountered the following problem: when using the map class from stlport
 (and these seem to be functions defined in stl\_tree.h), when building from the
 IDDE, I get the following errors on linking:
 
 Error: D:\MYPROJECTS\TEST\Main.OBJ(Main)  (1293653086): Symbol Undefined
 ?_M_increment ?$_Rb_global _N  SAPAU_Rb_tree_node_base  PAU2  Z
 Error: D:\MYPROJECTS\TEST\Main.OBJ(Main)  (1293653086): Symbol Undefined
 ?_M_decrement ?$_Rb_global _N  SAPAU_Rb_tree_node_base  PAU2  Z
 Error: D:\MYPROJECTS\TEST\Main.OBJ(Main)  (1293653086): Symbol Undefined
 ?_Rebalance ?$_Rb_global _N  SAXPAU_Rb_tree_node_base  AAPAU2  Z
 
 The same file builds successfully from the command line, even without
specifying
 the stlport static lib (this seems to be required only when using streams).

I guess you are compiling with -D_STLP_NO_NEW_IOSTREAMS from the command line (but not from the IDDE). The reason it doesn't work without _STLP_NO_NEW_IOSTREAMS is that DM doesn't support explicit template instantiation and therefore some template instantiations are currently missing from the STLport libraries (but when compiling with _STLP_NO_NEW_IOSTREAMS these STLport libraries aren't needed). bye, Christof -- http://cmeerw.org JID: cmeerw jabber.at mailto cmeerw at web.de ...and what have you contributed to the Net?
Sep 13 2002
↑ ↓ → Dimitri Kaparis <Dimitri_member pathlink.com> writes:
In article <alsa0g$12mc$1 digitaldaemon.com>, Christof Meerwald says...
On Thu, 12 Sep 2002 21:24:51 +0000 (UTC), Dimitri Kaparis wrote:
 I have encountered the following problem: when using the map class from stlport
 (and these seem to be functions defined in stl\_tree.h), when building from the
 IDDE, I get the following errors on linking:
 
 Error: D:\MYPROJECTS\TEST\Main.OBJ(Main)  (1293653086): Symbol Undefined
 ?_M_increment ?$_Rb_global _N  SAPAU_Rb_tree_node_base  PAU2  Z
 Error: D:\MYPROJECTS\TEST\Main.OBJ(Main)  (1293653086): Symbol Undefined
 ?_M_decrement ?$_Rb_global _N  SAPAU_Rb_tree_node_base  PAU2  Z
 Error: D:\MYPROJECTS\TEST\Main.OBJ(Main)  (1293653086): Symbol Undefined
 ?_Rebalance ?$_Rb_global _N  SAXPAU_Rb_tree_node_base  AAPAU2  Z
 
 The same file builds successfully from the command line, even without
specifying
 the stlport static lib (this seems to be required only when using streams).

I guess you are compiling with -D_STLP_NO_NEW_IOSTREAMS from the command line (but not from the IDDE).

Actually I build from the command line without specifying any additional parameters, like: sc test.cpp It does not seem this defines _STLP_NO_NEW_IOSTREAMS because if I try it with a file that uses streams and I don't specify the stlport lib, I still get a bunch of unresolved symbols at linking. I can use map, however without any problems - not so from the IDDE. Now I have tried defining _STLP_NO_NEW_IOSTREAMS in the project settings in IDDE and this indeed solves the problem with map and also I can use iostreams without linking with the stlport lib. However this also doesn't explain why I don't get these errors when linking with the dynamic library? Thanks, Dimitri
Sep 13 2002