Re: porting programs from VC++ to eVC++

r_z_aret_at_pen_fact.com
Date: 01/20/05

  • Next message: Daniel Moth: "Re: numericUpdown min max and sip input"
    Date: Thu, 20 Jan 2005 16:20:45 -0500
    
    

    On Thu, 20 Jan 2005 00:38:30 -0500, "Cecilia Li" <cecila.li@gmail.com>
    wrote:

    >Hi,
    >
    >I am trying to to develop a speech command system on the Pocket PC. So far I
    >am working on the speech processing and recognition algorithms on Visual C++
    >console. What is the best way to port the program over to emBedded Visual
    >C++? Do I have to include all the files in the eVC++ project and somehow
    >call the functions within my eVC++ program and make sure it compiles? Or can
    >I somehow create a .exe file from the VC++ console program and call it from
    >eVC++?

    Building the an exe in VC and modifying it is definitely _not_ the way
    to go. Maybe possible, but not without a lot of work.

    I suggest copying all the source code to a new directory and using it
    in a fresh eVC project. If you're lucky, you won't need many changes
    and you can use the changed code in both projects (VC and eVC). You
    may need a few #ifdefs. If you're not lucky, you will need to maintain
    two sets of source code.

    Most likely problems:

    1) UNICODE _must_ be defined when building for Windows CE. That means
    most strings are UNICODE and most Win32 functions that take strings
    take _only_ UNICODE strings. If you've been using TCHAR and relatives,
    you should be fine. If you've been using char and relatives, you will
    have a tough time. This can be a source of much confusion and
    problems, so I _STRONGLY_ recommend taking time to understand UNICODE
    soon. For leads, use google
    (http://groups.google.com/advanced_group_search) to look up
    unicode
    in this newsgroup.

    2) Windows CE supports a subset of the Win32 API. You might be able to
    find a list of what's missing. But I think you will have a much easier
    time if you let the compiler find the functions it doesn't recognize

    3) When you include windows.h for VC, many other headers are
    automatically included as well. For eVC, you will need to be much more
    explicit. This makes my suggestion 2 a bit frustrating. I use grep to
    find the right header for each "missing" function. If neither grep nor
    help finds a function, it is not supported.

    I just used google to look up
    porting
    in this newsgroup (microsoft.public.pocketpc.developer) and got 277
    hits. I looked quickly and think at least some of the first few were
    useful.

    >
    >I'm fairly new to the emBedded VC++ environment so any help would be
    >appreciated. Thanks.
    >
    >Cecilia
    >
    >

    -----------------------------------------
    To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

    Robert E. Zaret, eMVP
    PenFact, Inc.
    500 Harrison Ave., Suite 3R
    Boston, MA 02118
    www.penfact.com


  • Next message: Daniel Moth: "Re: numericUpdown min max and sip input"

    Relevant Pages

    • Re: compile a Win32 app for WINDOWS CE platform
      ... how to do for Windows CE. ... in this newsgroup and got 427 hits. ... arguments accept _only_ UNICODE strings. ...
      (microsoft.public.pocketpc.developer)
    • Re: compile a Win32 app for WINDOWS CE platform
      ... how to do for Windows CE. ... in this newsgroup and got 427 hits. ... arguments accept _only_ UNICODE strings. ...
      (microsoft.public.pocketpc.developer)
    • Re: How to check variables for uniqueness ?
      ... characters is the sequence SS. ... is simply capitalizing strings. ... The fact that case mapping in English /is/ simple is neither here not ... That is a fair criticism of the Unicode position. ...
      (comp.lang.java.programmer)
    • Re: Dangerous behavior of CString
      ... If I'm reading a data file or serial port or something, if the raw data are multibyte but the compilation is Unicode or vice-versa, then sometimes the converting constructors in CString are convenient. ... I did not actually write code like this; in fact I was pretty careful always to use the _T macro with any literal strings. ... But it does the conversion using the current 8-bit code page, which is not what I want. ...
      (microsoft.public.vc.mfc)
    • Re: Help please
      ... i would like to provide "CSimString" class code because the settings ... I agree with Tom that first step is project clean and rebuild all. ... with a Unicode string, ... Consider that VS2005 strings are Unicode by default, ...
      (microsoft.public.vc.mfc)