What is the best to way develop an unmanaged C++ DLL for both Win32 and WinCE?
I am interested in opinions on how best to setup a VS2008 project so that a DLL is compiled as both a smart device DLL as well as a C++ Win32 DLL. Is there开发者_开发问答 an alternative to having two projects and the source files are shared?
Yeah, you can do this by using more than one platform. Tricky to get right though, you can't get the settings initialized from a project template. Best thing to do is to start the project with a SmartDevice project template since it has the most custom settings. Then Build + Configuration Manager, Active solution platform = New and select Type = Win32, Copy = None.
That last one is the painful bit, you'll have to change the Win32 specific settings yourself. Best thing to do is to open a sample Win32 .vcproj in a text editor and check with setting overrides it has. So you can reproduce them in your custom project. Copy and paste works btw, that's the quickest and safest way.
精彩评论