All Forums
 Microsoft Windows CE
 General CE
 string class support in CE 5.0 ?
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

vboccanfuso

30 Posts

Posted - 04 Jul 2008 :  17:32:53  Show Profile
Is the C++ string class () supported in CE 5.0? If so, are there any limitations? If not, what can be used in its place? Thanks in advance!

vboccanfuso

30 Posts

Posted - 04 Jul 2008 :  17:45:34  Show Profile
To be clear I'm referring to the basic_string Class that is defined here:

ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_vcstdlib/html/a9c3e0a2-39bf-4c8a-b093-9abe30839591.htm

Go to Top of Page

grenierm

133 Posts

Posted - 09 Jul 2008 :  18:34:40  Show Profile  Email Poster
Thank you for your question.

Unfortunately, the C++ String Class is not supported in CE 5.0

An alternative could be to consider using the MFC String Class.
Go to Top of Page

ctacke

877 Posts

Posted - 09 Jul 2008 :  18:53:21  Show Profile  Email Poster
A far lighter-weight and much less buggy solution would be to use an implementation of STL like STLPort or the port from SyncData.
Go to Top of Page

vboccanfuso

30 Posts

Posted - 16 Jul 2008 :  09:15:38  Show Profile
Does anyone know why the code below compiles but doesn't link (ignore quotes around include)?

#include '<'string'>'
using std::string;

string x;

I get the following linker error:

error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl std::basic_string,class std::allocator >::basic_string,class std::allocator >(class std::allocator const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAA@ABV?$allocator@D@1@@Z) referenced in function "void __cdecl `dynamic initializer for 'x''(void)" (??__Ex@@YAXXZ)
Go to Top of Page

beitman

63 Posts

Posted - 16 Jul 2008 :  13:56:13  Show Profile  Email Poster
Which of the STL implementations that ctacke recommended did you decide to use?

Did you add its library to your linker settings?
Go to Top of Page

vboccanfuso

30 Posts

Posted - 16 Jul 2008 :  14:02:39  Show Profile
I am not using either of the recommended STL implementations - is that my problem? I thought that since I was able to compile my code that std::string was built-in but that I was doing something wrong (like not including some windows library).
Go to Top of Page

vboccanfuso

30 Posts

Posted - 16 Jul 2008 :  15:20:50  Show Profile
I think I found the problem - I had changed the order of the include directories. When I put them back to their original order, my std::string code links fine.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000