From: Christopher Fairbairn [MVP] on
Hi Allan,

"Allan Phillips" <allanephillips(a)gmail.com> wrote in message
news:eh5XrDyJJHA.5972(a)TK2MSFTNGP06.phx.gbl...
> I've just had one thought - this app was written using MFC.
> Is it necessary to include extra DLLs when building a Windows Mobile app
> that makes use of MFC?

A couple of thoughts cross my mind.

First take a second look at the output of the depends utility. Check the
"Subsystem Ver" field for your executable. In order to run on Windows Mobile
2003 Pocket PC edition this field should probably have the value 4.21. If
the value is 5.0 or higher it indicates your application was built against
the Windows Mobile 5.0 or 6 SDKs and this will explain why it will not run
on WM 2003 devices.

You may need to deploy MFC related DLLs depending upon how your application
is built. See for example the details provided in the "Walkthrough:
Packaging a Smart Device Solution for Deployment" article available on
MSDN at http://msdn.microsoft.com/en-us/library/zcebx8f8.aspx

Hope this helps,
Christopher Fairbairn


From: Allan Phillips on
Thanks Christopher.

I see that my .EXE shows a "Subsystem Ver" of "5.1" - so I guess that's a
problem.

Now I just have to figure out which compiler/linker setting will change
that.

Allan.

"Christopher Fairbairn [MVP]" <christopher(a)christec.co.nz> wrote in message
news:%23VyuP7yJJHA.2444(a)TK2MSFTNGP06.phx.gbl...
> Hi Allan,
>
> "Allan Phillips" <allanephillips(a)gmail.com> wrote in message
> news:eh5XrDyJJHA.5972(a)TK2MSFTNGP06.phx.gbl...
>> I've just had one thought - this app was written using MFC.
>> Is it necessary to include extra DLLs when building a Windows Mobile app
>> that makes use of MFC?
>
> A couple of thoughts cross my mind.
>
> First take a second look at the output of the depends utility. Check the
> "Subsystem Ver" field for your executable. In order to run on Windows
> Mobile 2003 Pocket PC edition this field should probably have the value
> 4.21. If the value is 5.0 or higher it indicates your application was
> built against the Windows Mobile 5.0 or 6 SDKs and this will explain why
> it will not run on WM 2003 devices.
>
> You may need to deploy MFC related DLLs depending upon how your
> application is built. See for example the details provided in the
> "Walkthrough: Packaging a Smart Device Solution for Deployment" article
> available on
> MSDN at http://msdn.microsoft.com/en-us/library/zcebx8f8.aspx
>
> Hope this helps,
> Christopher Fairbairn
>


From: Doug Forster on
Hi Allan,

> Is it necessary to include extra DLLs when building a Windows Mobile app
> that makes use of MFC?

I would strongly advise using static linking for MFC projects. The overhead
is surprisingly little.

Cheers
Doug Forster

From: Allan Phillips on
Thanks Doug.

I now see that I was always using MFC statically linked. Therefore, the
problem can't be caused by MFC DLLs.

It seems as though the problem is related to the version of Windows Mobile
that I'm building the app for.

As I mentioned before, my .EXE shows a "Subsystem Ver" of "5.1". However, I
cannot figure out what I have to do to get that back to a Subsystem Ver of
"4.21" or something like that.

Thanks, Allan.


"Doug Forster" <nobody(a)nowhere.com> wrote in message
news:%23XgEIV0JJHA.740(a)TK2MSFTNGP03.phx.gbl...
> Hi Allan,
>
>> Is it necessary to include extra DLLs when building a Windows Mobile app
>> that makes use of MFC?
>
> I would strongly advise using static linking for MFC projects. The
> overhead is surprisingly little.
>
> Cheers
> Doug Forster


From: r_z_aret on
On Sun, 5 Oct 2008 17:22:46 -0400, "Allan Phillips"
<allanephillips(a)gmail.com> wrote:

>Thanks Christopher.
>
>I see that my .EXE shows a "Subsystem Ver" of "5.1" - so I guess that's a
>problem.
>
>Now I just have to figure out which compiler/linker setting will change
>that.

Using the correct SDK should be sufficient. Did you really use the
Pocket PC 2003 SDK and really chose Pocket PC 2003 (ARMV4) as your
target?.


>
>Allan.
>
>"Christopher Fairbairn [MVP]" <christopher(a)christec.co.nz> wrote in message
>news:%23VyuP7yJJHA.2444(a)TK2MSFTNGP06.phx.gbl...
>> Hi Allan,
>>
>> "Allan Phillips" <allanephillips(a)gmail.com> wrote in message
>> news:eh5XrDyJJHA.5972(a)TK2MSFTNGP06.phx.gbl...
>>> I've just had one thought - this app was written using MFC.
>>> Is it necessary to include extra DLLs when building a Windows Mobile app
>>> that makes use of MFC?
>>
>> A couple of thoughts cross my mind.
>>
>> First take a second look at the output of the depends utility. Check the
>> "Subsystem Ver" field for your executable. In order to run on Windows
>> Mobile 2003 Pocket PC edition this field should probably have the value
>> 4.21. If the value is 5.0 or higher it indicates your application was
>> built against the Windows Mobile 5.0 or 6 SDKs and this will explain why
>> it will not run on WM 2003 devices.
>>
>> You may need to deploy MFC related DLLs depending upon how your
>> application is built. See for example the details provided in the
>> "Walkthrough: Packaging a Smart Device Solution for Deployment" article
>> available on
>> MSDN at http://msdn.microsoft.com/en-us/library/zcebx8f8.aspx
>>
>> Hope this helps,
>> Christopher Fairbairn
>>
>

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

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 400
Boston, MA 02116
www.penfact.com