Porting a program replacing the STL - feasible?

L

Leo Meyer

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
 
P

Pascal J. Bourguignon

Leo Meyer said:
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.
 
G

Gernot Frisch

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.
 
L

Leo Meyer

Pascal said:
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
 
L

Leo Meyer

Gernot said:
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
 
L

Leo Meyer

Leo said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top