PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Almost there-STLPort Link problems

Well, this is my first post although I've been trolling for a little while (2 weeks or so). I've been developing my game engine using Desktop emulation during that time and I finally ported to eVC. Well, it surprisingly compiled easier than I thought. Had 3 errors just related to Unicode. Now however, I'm getting linking errors that appear to be related to StlPort (details below).

Question: Do I need to build STLPort for my application (I use it in my code too in addition to whatever PocketFrog is using it for)? If so, anyone know the best way? If I don't need to build, anyone have any idea where these errors are stemming from?

Details:
Code:

TilesetManager.obj : error LNK2019: unresolved external symbol "private: static void * __cdecl _STL::__malloc_alloc<0>::_S_oom_malloc(unsigned int)" (?_S_oom_malloc@?$__malloc_alloc@$0A@@_STL@@CAPAXI@Z) referenced in function "public: static void *
__cdecl _STL::__malloc_alloc<0>::allocate(unsigned int)" (?allocate@?$__malloc_alloc@$0A@@_STL@@SAPAXI@Z)
World.obj : error LNK2001: unresolved external symbol "private: static void * __cdecl _STL::__malloc_alloc<0>::_S_oom_malloc(unsigned int)" (?_S_oom_malloc@?$__malloc_alloc@$0A@@_STL@@CAPAXI@Z)
TilesetManager.obj : error LNK2019: unresolved external symbol "public: static struct _STL::_Rb_tree_node_base * __cdecl _STL::_Rb_global<bool>::_M_decrement(struct _STL::_Rb_tree_node_base *)" (?_M_decrement@?$_Rb_global@_N@_STL@@SAPAU_Rb_tree_node
_base@2@PAU32@@Z) referenced in function "public: struct _STL::_Rb_tree_iterator<struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > const ,class CTileset *>,struct _STL::_Nonconst_traits<struc
t _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > const ,class CTileset *> > > & __cdecl _STL::_Rb_tree_iterator<struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class
_STL::allocator<char> > const ,class CTileset *>,struct _STL::_Nonconst_traits<struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > const ,class CTileset *> > >::operator--(void)" (??F?$_Rb_tre
e_iterator@U?$pair@$$CBV?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@PAVCTileset@@@_STL@@U?$_Nonconst_traits@U?$pair@$$CBV?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@PAVCTileset@@@_STL@@@2@@_STL@@QAAAAU01@XZ)
World.obj : error LNK2001: unresolved external symbol "public: static struct _STL::_Rb_tree_node_base * __cdecl _STL::_Rb_global<bool>::_M_decrement(struct _STL::_Rb_tree_node_base *)" (?_M_decrement@?$_Rb_global@_N@_STL@@SAPAU_Rb_tree_node_base@2@P
AU32@@Z)
TilesetManager.obj : error LNK2019: unresolved external symbol "public: static void __cdecl _STL::_Rb_global<bool>::_Rebalance(struct _STL::_Rb_tree_node_base *,struct _STL::_Rb_tree_node_base * &)" (?_Rebalance@?$_Rb_global@_N@_STL@@SAXPAU_Rb_tree_
node_base@2@AAPAU32@@Z) referenced in function "private: struct _STL::_Rb_tree_iterator<struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > const ,class CTileset *>,struct _STL::_Nonconst_trait
s<struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > const ,class CTileset *> > > __cdecl _STL::_Rb_tree<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char>
>,struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > const ,class CTileset *>,struct _STL::_Select1st<struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL:
:allocator<char> > const ,class CTileset *> >,struct _STL::less<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > >,class _STL::allocator<struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits
<char>,class _STL::allocator<char> > const ,class CTileset *> > >::_M_insert(struct _STL::_Rb_tree_node_base *,struct _STL::_Rb_tree_node_base *,struct _STL::pair<class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char
> > const ,class CTileset *> const &,struct _STL::_Rb_tree_node_base *)" (?_M_insert@?$_Rb_tree@V?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@U?$pair@$$CBV?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@PAVCTileset@@
@2@U?$_Select1st@U?$pair@$$CBV?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@PAVCTileset@@@_STL@@@2@U?$less@V?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DV?$char_traits@D
@_STL@@V?$allocator@D@2@@_STL@@PAVCTileset@@@_STL@@@2@@_
STL@@AAA?AU?$_Rb_tree_iterator@U?$pair@$$CBV?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@PAVCTileset@@@_STL@@U?$_Nonconst_traits@U?$pair@$$CBV?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@PAVCTileset@@@_STL@@@2@@2@
PAU_Rb_tree_node_base@2@0ABU?$pair@$$CBV?$basic_string@DV?$char_traits@D@_STL@@V?$allocator@D@2@@_STL@@PAVCTileset@@@2@0@Z)
World.obj : error LNK2001: unresolved external symbol "public: static void __cdecl _STL::_Rb_global<bool>::_Rebalance(struct _STL::_Rb_tree_node_base *,struct _STL::_Rb_tree_node_base * &)" (?_Rebalance@?$_Rb_global@_N@_STL@@SAXPAU_Rb_tree_node_base
@2@AAPAU32@@Z)
TilesetManager.obj : error LNK2019: unresolved external symbol "void __cdecl _STL::__stl_throw_length_error(char const *)" (?__stl_throw_length_error@_STL@@YAXPBD@Z) referenced in function "public: void __cdecl _STL::_String_base<char,class _STL::al
locator<char> >::_M_throw_length_error(void)const " (?_M_throw_length_error@?$_String_base@DV?$allocator@D@_STL@@@_STL@@QBAXXZ)
World.obj : error LNK2001: unresolved external symbol "void __cdecl _STL::__stl_throw_length_error(char const *)" (?__stl_throw_length_error@_STL@@YAXPBD@Z)
ARMDbg/RPG.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.
codepunk · 27 Sep 2002, 01:49 UTC — More Info
BTW, the 2 classes from STLPort that I use are <string> and <map>. Could the problem be that these classes somehow use functionality contained within the iostreams library?
Looks like it. The only reason you would need to link with STLport is if you are using the streams.

Make sure the I/O streams are completely disabled in your stl_user_config.h file.
Kzinti wrote:
Looks like it. The only reason you would need to link with STLport is if you are using the streams.

Make sure the I/O streams are completely disabled in your stl_user_config.h file.


I'm using the config file that came with PocketFrog. I'd sure hate to have to throw out all my code that uses stl.
codepunk · 27 Sep 2002, 19:20 UTC — I DID IT!!!!
Finally. Here's all I had to do. In the user config file supplied by PocketFrog you can see a #define that is commented named: _STLP_NO_CUSTOM_IO.

Simply uncommenting that macro allowed me to link fine. I get the truncated warning but that's easy enough to #pragma out.

Now I get to see if my project works on an actual device.

-Mark[/code]
That's a new problem I haven't encountered before. I will update my stl_user_config.h that ships with PF.
Thanks!