Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Porting a program replacing the STL - feasible?

Reply
Thread Tools

Porting a program replacing the STL - feasible?

 
 
Leo Meyer
Guest
Posts: n/a
 
      09-23-2009
Hello,

let me fill in the background before asking the question.
I want to use gpsVP (http://code.google.com/p/gpsvp/) to display maps on an older PDA
(iPaq 3660). The authors do not provide binaries for this system, so I have to compile my own.
The PDA's OS is "Pocket PC 2000", and Microsoft provides a compiler for that (Microsoft
embedded tools 3.0). Now the problem is, according to Microsoft, the 3.0 version C++ compiler
doesn't support exceptions. Consequently, it doesn't support the STL (the 4.0 version does,
but it doesn't support the target platform). Unfortunately gpsVP uses STL classes (list, map,
hash_map, wstring, auto_ptr etc.), and when I try to compile the project I get errors.
Again unfortunately, my C++ background isn't very strong. While the language (and, of course,
programming in general) isn't much of a problem, I have little experience with the STL and any
possible alternatives.
So, what I'd like to ask, is there a feasible way to replace the STL classes by those of
another library? Feasible in the sense that it doesn't take ages to port, meaning that some
similarities should be there. I think I can understand the code quickly enough so that's not
the bottleneck in this situation.
Any ideas how you would approach this? Does it make sense at all?
If, maybe, there should be something wrong with my way of expressing this problem - in this
case, please correct the noob in a friendly manner

Kind regards, Leo


 
Reply With Quote
 
 
 
 
Pascal J. Bourguignon
Guest
Posts: n/a
 
      09-23-2009
"Leo Meyer" <(E-Mail Removed)> writes:

> Hello,
>
> let me fill in the background before asking the question.
> I want to use gpsVP (http://code.google.com/p/gpsvp/) to display maps on an older PDA
> (iPaq 3660). The authors do not provide binaries for this system, so I have to compile my own.
> The PDA's OS is "Pocket PC 2000", and Microsoft provides a compiler for that (Microsoft
> embedded tools 3.0). Now the problem is, according to Microsoft, the 3.0 version C++ compiler
> doesn't support exceptions. Consequently, it doesn't support the STL (the 4.0 version does,
> but it doesn't support the target platform). Unfortunately gpsVP uses STL classes (list, map,
> hash_map, wstring, auto_ptr etc.), and when I try to compile the project I get errors.
> Again unfortunately, my C++ background isn't very strong. While the language (and, of course,
> programming in general) isn't much of a problem, I have little experience with the STL and any
> possible alternatives.
> So, what I'd like to ask, is there a feasible way to replace the STL classes by those of
> another library? Feasible in the sense that it doesn't take ages to port, meaning that some
> similarities should be there. I think I can understand the code quickly enough so that's not
> the bottleneck in this situation.
> Any ideas how you would approach this? Does it make sense at all?
> If, maybe, there should be something wrong with my way of expressing this problem - in this
> case, please correct the noob in a friendly manner


You could take the sources of (an implementation of) the STL, and
remove any throw, and try to compile again.

Since exceptions are only used in exceptional cases, if there's no
exceptional case in your program then it should be ok.

Otherwise, you would have to modify that STL implementation to use
another mechanism than exceptions to report errors.

--
__Pascal Bourguignon__
 
Reply With Quote
 
 
 
 
Gernot Frisch
Guest
Posts: n/a
 
      09-23-2009


> Now the problem is, according to Microsoft, the 3.0 version C++ compiler
> doesn't support exceptions.


I'm not sure, but I think that the compiled executables from any newer
visual studio will run on PocketPC 2000, if you set the right defines and
don't use library functions that were unavailable back then.
I'm using a GCC compiler for PocketPC, which worked from 2000 to WM6.5
perfectly.

 
Reply With Quote
 
Leo Meyer
Guest
Posts: n/a
 
      09-23-2009
Pascal J. Bourguignon wrote:
> "Leo Meyer" <(E-Mail Removed)> writes:
>> So, what I'd like to ask, is there a feasible way to replace the STL

>
> You could take the sources of (an implementation of) the STL, and
> remove any throw, and try to compile again.


Hi,
yes, that's probably a good solution
Could you recommend any implementation that might be suitable?

Thanks for the quick reply...
Regards, Leo


 
Reply With Quote
 
Leo Meyer
Guest
Posts: n/a
 
      09-23-2009
Gernot Frisch wrote:
>> Now the problem is, according to Microsoft, the 3.0 version C++
>> compiler doesn't support exceptions.

>
> I'm not sure, but I think that the compiled executables from any newer
> visual studio will run on PocketPC 2000, if you set the right defines
> and don't use library functions that were unavailable back then.
> I'm using a GCC compiler for PocketPC, which worked from 2000 to WM6.5
> perfectly.


Hm, I've tried to install the provided PocketPC 2002 binaries.
It brought up a warning about the wrong version, but I installed it anyway;
nevertheless it gave an error about missing libraries when I tried to start it.

My problem is, the PocketPC 2000 seems not to be supported any longer by Microsoft,
and I don't know how to build for this platform without a proper target SDK.
I have Visual Studio 6 and 2005 available, but I don't have enough knowledge to
manually assemble all the headers and libraries I need to build for the iPaq.
That's the reason I want to use the old Embedded Tools 3.0 thing, at least it works
"out of the box" without too much hassle (if it weren't for the compiler incompatibility).

The GCC compiler seems to be a promising option, too; is it CeGCC you are using
or is there any other you would recommend? Being easy to use for a beginner would be
a huge plus

Thanks and regards,
Leo


 
Reply With Quote
 
Pascal J. Bourguignon
Guest
Posts: n/a
 
      09-23-2009
"Leo Meyer" <(E-Mail Removed)> writes:

> Pascal J. Bourguignon wrote:
>> "Leo Meyer" <(E-Mail Removed)> writes:
>>> So, what I'd like to ask, is there a feasible way to replace the STL

>>
>> You could take the sources of (an implementation of) the STL, and
>> remove any throw, and try to compile again.

>
> Hi,
> yes, that's probably a good solution
> Could you recommend any implementation that might be suitable?


Perhaps stlport would do.
http://www.stlport.org/


--
__Pascal Bourguignon__
 
Reply With Quote
 
Leo Meyer
Guest
Posts: n/a
 
      09-25-2009
Leo Meyer wrote:
> Gernot Frisch wrote:
>> I'm using a GCC compiler for PocketPC, which worked from 2000 to
>> WM6.5 perfectly.

> The GCC compiler seems to be a promising option, too;


CeGCC doesn't work well. I can't compile under Cygwin so I tried under Linux but there are too many
library functions missing. I don't think it makes sense continuing this way.
Maybe it's different for apps written from scratch.

Kind regards,
Leo


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fast binary search - replacing stl::equal_range() Ole Nielsby C++ 1 12-29-2008 11:18 PM
Problem with porting some STL code from VS to GCC Frank Steinmetzger C++ 2 03-29-2008 09:10 PM
Replacing Key of STL Map? Steve555 C++ 2 04-04-2007 05:11 PM
Replacing - and not Replacing... Rob Meade ASP General 5 04-11-2005 06:49 PM
Problems porting a program from one computer to another. MSXML version? OKI XML 1 02-27-2004 07:23 PM



Advertisments