MobiNav

All Things Mobility

novembre 6th, 2006

vs2005

VS2005用MFC开发PPC发布时也要发布MFC8U.dll、MSVCR80.dll、MFC80CHS.dll几个动态链接库才能保证程序运行,因为PPC上只提供了MFC42版本的动态链接库。 (see also http://msdn2.microsoft.com/en-us/library/ms235624(VS.80).aspx)

Assembly Name DLLs included in the assembly Visual C++ Library
Microsoft.VC80.ATL atl80.dll Active Template Library
Microsoft.VC80.CRT msvcr80.dll

msvcp80.dll

msvcm80.dll

C Runtime Library, release DLLs
Microsoft.VC80.DebugCRT msvcr80d.dll

msvcp80d.dll

msvcm80d.dll

C Runtime Library, debug DLLs
Microsoft.VC80.MFC mfc80.dll

mfcm80.dll

mfc80u.dll

mfcm80u.dll

Microsoft Foundation Classes, release DLLs
Microsoft.VC80.DebugMFC mfc80d.dll

mfcm80d.dll

mfc80ud.dll

mfcm80ud.dll

Microsoft Foundation Classes, debug DLLs
Microsoft.VC80.MFCLOC mfc80chs.dll

mfc80deu.dll

mfc80esp.dll

mfc80ita.dll

mfc80kor.dll

mfc80cht.dll

mfc80enu.dll

mfc80fra.dll

mfc80jpn.dll

Microsoft Foundation Classes, localized resources
Microsoft.VC80.OpenMP vcomp.dll OpenMP Library, release DLLs
Microsoft.VC80.DebugOpenMP Vcompd.dll OpenMP Library, debug DLLs
novembre 3rd, 2006

One Source Code for Different Platforms

(Source: MSDN

If you are targeting more than one Windows CE platform, but you still want to maintain a single source code, then you can either choose to develop against the least common denominator or work with #ifdef $(CePlatform) preprocessor define. This article will show you how to use this define most effectively.

Applies to:
   Microsoft Windows Powered Pocket PC 2000
   Microsoft eMbedded Visual C++
   Pocket PC software development kit (SDK) or Handheld PC 2000 SDK (or any other Microsoft Windows CE SDK)

Gotchas

If you are using an SDK from any OEM that has an embedded device, then you have to fix an entry in the registry to get the key working correctly. Here is how:

  1. On your personal computer, type « Regedit » in the « Run … » dialog box of the Start menu.
  2. Locate the Registry key:HKLM\Software\Microsoft\Windows CE Tools\Platform Manager {F384D888-F9AA-11D1-BB9E-00A0C9C9CCEE}

    Its default key should read « Platforms. »

  3. You will see a lot of globally unique identifiers (GUIDs) under that key. Each GUID represents one platform that is installed on your PC; for example, the GUID for Pocket PC is {6D5C6210-E14B-11D2-B72A-0000F8026CEE}. Unfortunately I cannot tell you the correct key of your OEM SDK, because it is different for all OEMs. You have to open them up one by one and look for a default key naming the platform of your OEM SDK.
  4. Open that key and you find again a series of GUIDs. The GUID we are looking for this time is {F384D894-F9AA-11D1-BB9E-00A0C9C9CCEE}. Its default value should read « Properties. »
  5. And again you will get a lot of GUIDs once you open the key above. This time you need to open all the keys to see which one is the right one. It should contain a key named « CEPlatform. »
  6. Rename the key « CePlatform. » Yes, you read correctly—the small « e » is actually what makes this key work. You actually have to rename it twice because RegEdit will not allow you to rename the key by just changing the big « E » to a small « e. » Rename the key « CeePlatform, » and then back to « CePlatform. »

The binary values of that key contain the Unicode string that the EVC compiler preprocessor is using as the $(CePlatform) replacement.