Porting a program replacing the STL - feasible?

Discussion in 'C++' started by Leo Meyer, Sep 23, 2009.

  1. Leo Meyer

    Leo Meyer Guest

    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
     
    Leo Meyer, Sep 23, 2009
    #1
    1. Advertising

  2. "Leo Meyer" <> 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__
     
    Pascal J. Bourguignon, Sep 23, 2009
    #2
    1. Advertising


  3. > 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.
     
    Gernot Frisch, Sep 23, 2009
    #3
  4. Leo Meyer

    Leo Meyer Guest

    Pascal J. Bourguignon wrote:
    > "Leo Meyer" <> 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
     
    Leo Meyer, Sep 23, 2009
    #4
  5. Leo Meyer

    Leo Meyer Guest

    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
     
    Leo Meyer, Sep 23, 2009
    #5
  6. "Leo Meyer" <> writes:

    > Pascal J. Bourguignon wrote:
    >> "Leo Meyer" <> 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__
     
    Pascal J. Bourguignon, Sep 23, 2009
    #6
  7. Leo Meyer

    Leo Meyer Guest

    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
     
    Leo Meyer, Sep 25, 2009
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. HUANG Huan
    Replies:
    2
    Views:
    715
    Dave Higton
    Feb 24, 2004
  2. lapenta[
    Replies:
    1
    Views:
    796
    Mike Treseler
    Nov 6, 2004
  3. Taras_96
    Replies:
    2
    Views:
    5,017
    Taras_96
    Aug 3, 2005
  4. Newbie
    Replies:
    4
    Views:
    414
    Newbie
    Oct 27, 2003
  5. Shepard Tate

    Is this feasible?

    Shepard Tate, Feb 25, 2004, in forum: HTML
    Replies:
    25
    Views:
    885
    Whitecrest
    Mar 1, 2004
Loading...

Share This Page