How to target the existing project to new platform

简介:

Recently, I am always asked about how to use the project on different platform or different Visual Studio version. For instance, If the project uses Windows Mobile 6 Professional SDK (ARMV4I) platform and bases on Visual Studio 2008, and you want to use it on Pocket PC 2003(ARMV4I) using Visual Studio 2005.

The easy way to achieve that is to change the project file. Following xml file illuminates the project file for CppUnitLite targeted to Windows Mobile 6 Professional SDK (ARMV4I) and based on Visual Studio 2008.

<?xml version="1.0" encoding="Windows-1252"?>
<
VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="CppUnitLite"
ProjectGUID="{A022C462-A27C-442D-999E-F36C91517D40}"
RootNamespace="CppUnitLite"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<
Platforms>
<
Platform
Name="Windows Mobile 6 Professional SDK (ARMV4I)"
/>
</
Platforms>
<
ToolFiles>
</
ToolFiles>
<
Configurations>
<
Configuration
Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="1"
>
<
Tool
Name="VCPreBuildEventTool"
/>
<
Tool
Name="VCCustomBuildTool"
/>
<
Tool
Name="VCXMLDataGeneratorTool"
/>
<
Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<
Tool
Name="VCMIDLTool"
/>
<
Tool
Name="VCCLCompilerTool"
ExecutionBucket="7"
Optimization="0"
PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
MinimalRebuild="true"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<
Tool
Name="VCManagedResourceCompilerTool"
/>
<
Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"
/>
<
Tool
Name="VCPreLinkEventTool"
/>
<
Tool
Name="VCLibrarianTool"
AdditionalOptions=" /subsystem:windowsce,5.02"
OutputFile="../Bin/CppUnitLite.lib"
/>
<
Tool
Name="VCALinkTool"
/>
<
Tool
Name="VCXDCMakeTool"
/>
<
Tool
Name="VCBscMakeTool"
/>
<
Tool
Name="VCFxCopTool"
/>
<
Tool
Name="VCCodeSignTool"
/>
<
Tool
Name="VCPostBuildEventTool"
/>
<
DeploymentTool
ForceDirty="-1"
RemoteDirectory=""
RegisterOutput="0"
AdditionalFiles=""
/>
<
DebuggerTool
/>
</
Configuration>
<
Configuration
Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="1"
>
<
Tool
Name="VCPreBuildEventTool"
/>
<
Tool
Name="VCCustomBuildTool"
/>
<
Tool
Name="VCXMLDataGeneratorTool"
/>
<
Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<
Tool
Name="VCMIDLTool"
/>
<
Tool
Name="VCCLCompilerTool"
ExecutionBucket="7"
Optimization="2"
FavorSizeOrSpeed="2"
PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_LIB;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<
Tool
Name="VCManagedResourceCompilerTool"
/>
<
Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)"
Culture="1033"
AdditionalIncludeDirectories="$(IntDir)"
/>
<
Tool
Name="VCPreLinkEventTool"
/>
<
Tool
Name="VCLibrarianTool"
AdditionalOptions=" /subsystem:windowsce,5.02"
OutputFile="http://www.cnblogs.com/app/sensors/Lib/CppUnitLite.lib"
/>
<
Tool
Name="VCALinkTool"
/>
<
Tool
Name="VCXDCMakeTool"
/>
<
Tool
Name="VCBscMakeTool"
/>
<
Tool
Name="VCFxCopTool"
/>
<
Tool
Name="VCCodeSignTool"
/>
<
Tool
Name="VCPostBuildEventTool"
/>
<
DeploymentTool
ForceDirty="-1"
RemoteDirectory=""
RegisterOutput="0"
AdditionalFiles=""
/>
<
DebuggerTool
/>
</
Configuration>
</
Configurations>
<
References>
</
References>
<
Files>
<
Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<
File
RelativePath=".\Failure.cpp"
>
</
File>
<
File
RelativePath=".\SimpleString.cpp"
>
</
File>
<
File
RelativePath=".\Test.cpp"
>
</
File>
<
File
RelativePath=".\TestRegistry.cpp"
>
</
File>
<
File
RelativePath=".\TestResult.cpp"
>
</
File>
</
Filter>
<
Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<
File
RelativePath=".\Failure.h"
>
</
File>
<
File
RelativePath=".\SimpleString.h"
>
</
File>
<
File
RelativePath=".\Test.h"
>
</
File>
<
File
RelativePath=".\TestHarness.h"
>
</
File>
<
File
RelativePath=".\TestRegistry.h"
>
</
File>
<
File
RelativePath=".\TestResult.h"
>
</
File>
</
Filter>
<
Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</
Filter>
<
File
RelativePath=".\ReadMe.txt"
>
</
File>
</
Files>
<
Globals>
</
Globals>
</
VisualStudioProject>

If you want to use this project on Pocket PC 2003 and use Visual Studio 2005 as the complier. Two things need to be changed for this case.

How to change

1. Change the complier version number.

<VisualStudioProject
ProjectType="Visual C++"
Version="9.00" <!-- Change the version number to 8.00 -->

 

2. Change the platform name.

<Platforms>
<
Platform
Name="Windows Mobile 6 Professional SDK (ARMV4I)" <!--ChangetheplatformnametoPocketPC2003(ARMV4).-->

Notes please, more than one spots use this platform name. All those platform names should be replaced by the new one.

How to confirm the new platform name

Right the project name and select properties. In this case, the platform name is Pocket PC 2003(ARMV4).

image


    本文转自Jake Lin博客园博客,原文链接:http://www.cnblogs.com/procoder/archive/2010/07/14/How-to-target-the-existing-project-to-new-platform.html,如需转载请自行联系原作者


相关文章
|
开发工具 数据安全/隐私保护 git
remote: The project you were looking for could not be found.
因为使用了不同的账号对不同的项目进行登录,在更换回原先的账户下载git上的代码时,就报了这个问题,这个问题的导致原因其实也就是我们不断更换登录账户所导致的。
567 0
remote: The project you were looking for could not be found.
|
4月前
|
缓存 iOS开发
Flutter run出现No Provisioning Profile was found for your project‘s Bundle Identifier or your device
Flutter run出现No Provisioning Profile was found for your project‘s Bundle Identifier or your device
62 2
|
7月前
target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target S
target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target S
107 0
|
Java Maven
No valid Maven installation found. Either set the home directory in the configuration dialog or set
No valid Maven installation found. Either set the home directory in the configuration dialog or set
1060 0
No valid Maven installation found. Either set the home directory in the configuration dialog or set
No matching configuration of project :libusb was found.
No matching configuration of project :libusb was found.
615 0
No plugin found for prefix ‘doclint‘ in the current project
No plugin found for prefix ‘doclint‘ in the current project
140 0
|
开发工具
Failed to find Build Tools revision 25.0.2
Failed to find Build Tools revision 25.0.2
131 0
|
开发工具 Android开发
Failed to find Build Tools revision 28.0.3
Failed to find Build Tools revision 28.0.3
320 0
Failed to find Build Tools revision 28.0.3

热门文章

最新文章