PocketMatrix forums

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

STL lib file

BurningScrappy · 02 Oct 2002, 07:22 UTC
Is there a make file for STLPort libs under eVC++3.0? The STLPort documentation said use whatever was closest(i thought vc6.mak was it) but this just generates a IX6 lib type when I try to link.

TIA
Robert
codepunk · 02 Oct 2002, 20:28 UTC — No need to build
Actually, you don't need to build STLPort to use it with eVC. I'm using it and I have yet to build it. Let me know if you run into any problems and I can help you out. I've successfully used the following classes: <string>, <map>, & <list>
There is no way to build STLport for eVC 3.0, due to some issues with how file handles are defined in WinCE.

This basically means that I/O Streams are not available... But everything else works perfectly (containers, algorithms, ...)
codepunk · 02 Oct 2002, 20:30 UTC — One more thing
Make sure you replace the stl_user_config.h file in stlport with the one in the etc folder of PocketFrog. Also (and this is important), until a new release of PocketFrog comes out, uncomment the line in the header that defines _STLP_NO_CUSTOM_IO. So it should be

#define _STLP_NO_CUSTOM_IO 1
I'm getting a single linker error while using VCE 3.0:

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: __cdecl _STL::_List_ba
se<class Tile,class _STL::allocator<class Tile> >::_List_base<class Tile,class _STL::allocator<class Tile> >(class _STL::allocator<class Tile> const &)" (??0?$_List_base@VTile@@V?$allocator@VTile@@@_STL@@@_STL@@QAA@ABV?$allocator@VTile@@@1@@Z)

Any ideas? Thank you
Well, I reverted to 4.5 and it compiles fine.
adde · 22 Oct 2002, 13:19 UTC — Unable to use STL
I get similar linking errors using std::string and std::vector on eVC++ 3.0. Does this mean eVC++ 3.0 can't use STL containers, or are there any other settings I could try (other defines to uncomment in std_user_config.h).

The <string> I can be without, but I really like to use <list> and <vector>.

Linking errors for reference:
Code:
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: int * __cdecl _STL::_S
TLP_alloc_proxy<int *,int,class _STL::allocator<int> >::allocate(unsigned int)" (?allocate@?$_STLP_alloc_proxy@PAHHV?$allocator@H@_STL@@@_STL@@QAAPAHI@Z)
error LNK2019: unresolved external symbol "void __cdecl _STL::__stl_throw_length_error(char const *)" (?__stl_throw_length_error@_STL@@YAXPBD@Z) referenced in function "private: class _STL::basic_string<char,class _STL::char_traits<char
>,class _STL::allocator<char> > & __cdecl _STL::basic_string<char,class _STL::char_traits&amp;lt;char&amp;gt;,class _STL::allocator&amp;lt;char&amp;gt; >::append(char *,char *,struct _STL::forward_iterator_tag const &)" (?append@?$basic_string@DV?$char_traits@D@_STL@@V?$alloca
tor@D@2@@_STL@@AAAAAV12@PAD0ABUforward_iterator_tag@2@@Z)
What version of STLport are you using? 4.5.3 works... The latest beta (5.0.0) does not.
Well, I'm using STLport 4.5.3 so there's gotta be something else.

Hmm.. Perhapps I should mention that I'm using an SDK for WinCE 3.0 H/PC (Siemens Mobic SDK). But that shouldn't be it, right?

And, if it's of any help, the link error comes first when I try to _use_ the containers. No linking error if only declared.
( No errors: "std::vector<int> v;"
Link error: "v.push_back(1);" )
adde · 23 Oct 2002, 17:50 UTC — STLPort 4.5 works!!
Ok, NOW it works. It doesn't work with STLport 4.5.3 BUT (as MadcapMac mentioned earlier on this thread although it was not clear to what he was refering) the STLport 4.5 WORKS (possibly 4.5.1 also, havn't tried that).

So, if someone else is having problems linking the STL library, now you know how to fix it.

Sorry guys for my ignorance, and thanks Kzinti for giving me the hint to try another STL version.
MadcapMac wrote:
I'm getting a single linker error while using VCE 3.0:

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: __cdecl _STL::_List_ba
se<class Tile,class _STL::allocator<class Tile> >::_List_base<class Tile,class _STL::allocator<class Tile> >(class _STL::allocator<class Tile> const &)" (??0?$_List_base@VTile@@V?$allocator@VTile@@@_STL@@@_STL@@QAA@ABV?$allocator@VTile@@@1@@Z)


I ran into the same problem when including <set>. This seems to be an STLport problem: by including <memory> first, everything works. ie:

Code:

#include <memory>
#Include <set>
Ok, I seem unable to make the STL containers (vector, list, map) work using STLport 4.5.3. I'm quite sure they were working at one point but they don't anymore.

I reverted to 4.5.1 like Adde did, and now it works.

I will investigate the matter when I have time. I would also like to be able to use 5.0.0. My feeling is that the only thing needed is a configuration file for eVC3.0 (this is missing from 4.5.3).
Ok, I got 4.5.3 working with all containers.

In STL_USER_CONFIG.H, you have to define both of these macros:


Code:

#define _STLP_NO_NEW_IOSTREAMS 1
#define _STLP_NO_IOSTREAMS 1