Thursday, October 23, 2008

M$ VS2008 下的 Device Application

在 V$ 2008 下建 Device 程式共有下列地方要修改

1. Library Issue : Use MFC in a Shared DLL.

Configuration Properties -> General -> Use of MFC

2. Unicode Issue :

(1) Treat wchar_t as Built-in Type : No

Configuration Properties -> C/C++ -> Language -> Treat wchar_t as Build-in Type

(2) Entry Point : wWinMainCRTStartup

Configuration Properties -> Linker -> Advanced -> Entry Point

3. Message MAP Macro.

Remove Class Name In Message MAP Macro

4. Deployment : Remote Directory.

Configuration Properties -> Deployment -> Remote Directory

5. Debugging, Remote Executable

Configuration Properties -> Debugging -> Remote Executable

6. For "warning C4812...", Modify Relation Template Function.

Compiler Warning (level 1) C4812

Error Message

obsolete declaration style: please use 'new_syntax' instead

In the current release of Visual C++, the explicit constructor specialization is still supported, but it may not be supported in a future release.

The following sample generates C4812:

// C4812.cpp
// compile with: /W1 /c
template
class MyClass;

template
class MyClass {
MyClass();
};

template
MyClass::MyClass() {} // C4812
// try the following line instead
// MyClass::MyClass() {}

7. Run App, …. Can Not Execute! If Use MFC / ATL!

Solution : Copy

(1) mfcce400(d).dll,

D:\Microsoft\WindowsCETools\wce500\Royaltek RC7B\Mfc\Lib\ARMV4I

(2) olece400(d).dll,

D:\Microsoft\WindowsCETools\wce500\Royaltek RC7B\Mfc\Lib\ARMV4I

(3) msvcr90(d).dll [At Least]

D:\Microsoft\Microsoft Visual Studio 9.0\VC\ce\dll\armv4i

To Device Exe Folder!

我負責

 ... + ...........  政策 我負責. 負責推卸責任. (阿不然你以為哩...) 聽說 記錯了 請見諒 深感抱歉.... 抗(國外)疫(苗)中...