I have a Visual Studio solution with many projects in it. There are debug and release configurations for both x86 and x64, and when a particular combination is selected everything is successfully built in that format.
However, there is now a requirement that, regardless of the "bitness" currently selected, a certain C++ project should be compiled as both x86 and x64. So for example, when the solution is built in x86 debug mode, there should be two debug copies of the exe in the build directory, one x86 and one x64.
What is the easiest way to achieve this? I've tried making two copies of the project, exename_32 and exename_64. My first idea was to copy the contents of the Debug|x64 node in the .vcproj file into the Debug|Win32 node for exename_64. But when I try to build the solution in Win32 mode, I get the following errors for the exename_64 project:
20>c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(17) : error C2371: 'size_t' : redefinition; different basic types
20> predefined C++ types (compiler internal)(19) : see declaration of 'size_t'
20>C:\Users\melol\Desktop\local\march03\src\thirdparty\Microsoft SDKs\Windows\v6.0\include\winnt.h(81) : fatal error C1189: #error : "No Target Architecture"
The exe in question is a Windows command line utility with a wWinMain. The only two #includes are
#include <windows.h>
#include <iostream>
Thoughts?
msbuild
ornmake
to call the project in x86 and x64 architectures. – Steve-o