Re: Compiling for WinCE C++ code developed with a non-MS IDE

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Microsoft does not provide a full STL implementation. That's *not* (by a
long ways), the most-portable of choices. You may have to either adjust how
do your I/O, find a third-party STL implementation (especially iostreams,
unfortunately for you), or rewrite everything. Further, eVC++ 4.0 is a
*very* old IDE, also, so it's not going to be as up-to-date as the latest
compilers from Microsoft. I've been building using eVC++ 4.0 for, wow, must
be approaching seven years.

I don't understand where "Java" came from. You would not expect to use that
on Windows Mobile, though. You will not be compiling on the device; you can
be sure of that. Without knowing what the specs of your "laptop" are, I
can't possibly assess whether it's "good enough" to work or not. There are
requirements for the compiler/IDE. Only you will be able to assess how well
you match up. Visual Studio .NET 2003 or Visual Studio 2005 would also be
possibilities. VS2005, in particular, has updated compilers for best
compatibility with the latest C++ standards, but that doesn't mean that
there's a complete STL for you in there (and, of course, VS is not free,
while eVC is).

Windows CE, the base operating system used under the Windows Mobile shell,
provides much, but not all, of the Win32 API which underlies the desktop
32-bit Windows operating systems. All code for Windows CE is Unicode-based,
so there are some limitations for code that you're trying to port which use
the ANSI model (if you call GetWindowText() to get the text edited in an
EDIT control, you *don't* get back char strings; you get back wchar_t
strings and you don't get a choice about that as you do on the desktop where
you can compile for Unicode *or* ANSI). That's where most of the base API
problems come up. You'll get a lot of 'error: cannot convert from unsigned
short * to char *' sorts of errors.

There's not going to be a tutorial on, ..., well, I'm not even sure what the
topic of the tutorial would be. Run the IDE of your choice. Create the
usual Hello, World application. Play with the choices provided in the New
Project wizards used to create Hello, World, to start with more-complex
applications. Try some applications that do various STL things and see what
is provided that you might need and what is not. Eventually, try to build a
project to build your actual code and see what sort of things work fine and
what completely fails. Figure out what to do. You know...do software
engineering.

Paul T.

"tilluf" <tilluf@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D6C99E27-FD81-4826-B97B-4AAD209458CF@xxxxxxxxxxxxxxxx
Hello!

I've recently had a request about an application written in C++, which
should use STL and be portable among different Operating Systems. A GUI
was
needed, so I chose wxWidgets and I developed it under Windows using
wxDev-C++. Now it turns out that this application needs to run under
Windows
Mobile/CE (I was given an IPaq with Windows Mobile 6 to test) and be
compiled
using eMbedded Visual C++ 4 if possible.

I have no idea about mobile programming but using Java, so my questions
are:
How can I compile the code I've written?
Do I compile on the smartphone or will my laptop do? :D
The one who requested the app tried to compile it, but some libraries
(iostream, ...) were missing. If I meet the same problem, how can I add
them?
Provided I used portable features, can I keep my code unchanged when
compiling for WinCE or do I need to use specific APIs?

I know the questions are dumb, but as a complete newbie that's what I
need -
I haven't actually found any good tutorial on this stuff, but maybe it's
because I'm lacking the basics, so if you can suggest me some
article/tutorial, please... you're welcome! ;)

Thank you in advance!



.



Relevant Pages

  • STL for Windows CE: compilation problems on VS2005
    ... I'm trying to use STL for Windows CE porting in a PocketPC application compiled in Visual Studio 2005, ... When I try to compile STL for Windows CE on my VS2005 application, I get a compilation error in stl_iterator.h when it tries to compile this: ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Is CMUCL insane? P.S. Me vs. CLM (Common Lisp Music)
    ... Or to build Windows without a working version of Windows. ... why are you trying to compile CMUCL?" ... let's assume I use Linux and not an emulator here... ...
    (comp.lang.lisp)
  • Re: Make a limited XP account without losing settings?
    ... ports to Windows have largely failed because some not so ... gEDA does what every CAD does, ... populist *ubuntu advertising has produced a heap of Linux users ... compile their applications and have control over the app's runtime ...
    (sci.electronics.design)
  • Re: ANNOUNCE: DBI 1.54 RC6 - including cool new DBD::Gofer stateless proxy
    ... Fixed to compile for perl built with -DNO_MATHOMS thanks to Jerry D. ... Changed setting trace file to no longer write "Trace file set" to new file. ... Updated DBI::DBD docs for driver authors thanks to Ammon Riley ... Some testing on strange platforms, like Windows, would be helpful as ...
    (perl.dbi.users)
  • Re: Momentary black screen when program launches
    ... lets say the compiler takes 5 seconds to compile my source. ... seconds is up then I can get back to the Windows desktop and I will see an ... spawned by another program (IDE, Explorer, etc.) ... The Help and Support newsgroup is *terribly* named, ...
    (microsoft.public.windowsxp.general)