Hi All,

I'm working on project migration in which a VS2003 C++ project is migrated to VS2010. The VS2003 project was built using NMAKE whereas the VS2010 project should use MSBUILD.

Based on the NMAKE commands I'm trying to create the respective MSBUILD file.


Below is a "compiling and linking command" in NMAKE file.

#macro DEFINE_FORCE_BUILD_VERSION
!ifdef FORCE_BUILD_VERSION
DEFINE_FORCE_BUILD_VERSION=/DFORCE_BUILD_VERSION=$(FORCE_BUILD_VERSION)
!else
DEFINE_FORCE_BUILD_VERSION=
!endif


cl /GX /MD /Zm800 /I..\..\include /I"$(PBASE_ANCHOR)\hs_regex\include" $(DEFINE_FORCE_BUILD_VERSION) /Fecode_generator.exe code_generator.cpp /link /LIBPATH:"$(PBASE_ANCHOR)\hs_regex\lib" hs_regex_static.lib

I'm trying to write its corresponding msbuild command.


<ItemGroup>
<ClInclude Include="$(PBASE_ANCHOR)\hs_regex\lib\hs_regex.lib" />
<ClInclude Include="$(PBASE_ANCHOR)\hs_regex\lib\hs_regex_static.lib" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(CODEGEN_DIR)\uff_code_generator.cpp" />
<ClCompile Include="$(CODEGEN_DIR)\cg_bootstrap.cpp" />
</ItemGroup>

<Target Name="build" >
<MSBuild Projects="@(ClCompile)" Targets="$(DEVENV_OPTION)" Properties="Configuration=$(CONFIGURATION)"/>
</Target>


This is what I have written to compile-n-link the code_generator.cpp and \cg_bootstrap.cpp.

Am I missing any targets or properties to get the .exe file, .obj file for code_generator.cpp and cg_bootstrap.cpp??

Any help would be appreciated.. :-)