Re: Compiling for WinCE C++ code developed with a non-MS IDE
- From: "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com>
- Date: Thu, 15 Nov 2007 08:57:21 -0700
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!
.
- Prev by Date: registry problem about two ethernet ports
- Next by Date: Re: Need help with Window Media Player
- Previous by thread: registry problem about two ethernet ports
- Next by thread: Re: Compiling for WinCE C++ code developed with a non-MS IDE
- Index(es):
Relevant Pages
|