I have an existing project that I compile on both Windows using Visual C++ 2008, and Debian Linux. This project uses a standard Visual C++ .vcproj
file, and some .cpp
and .h
files. It does not rely on any Windows specific stuff. Just plain C++.
It compiles and run well on Linux, using a home made tool that reads the .vcproj
file to generate a Makefile
which is used with make
to compile and link all files using g++
.
The trouble is that with Visual C++ 2010 (and 2012), the format of the project files have changed. Even the name has been changed from .vcproj
to .vcxproj
. My home made tool cannot read this new project file to generate the Makefile
.
Instead of upgrading the home made tool to support new project files, I was wondering if xbuild
would be able to compile my Linux executable?
I tried first to compile my own (VC++2008) project, but xbuild
complains that my project is a VS2003 project, which is not supported by xbuild.
However when googling on this matter, I find that xbuild
is supposed to support VS2005 project files. There are also some references to mdtool
to support these old project files, but I seems to be integrated into xbuild
now.
Furthermore, I tried to compile a Visual C++ 2010 example (HuoChess) got from the MSDN site. The result is
/Microsoft.Cpp.Default.props: Project file could not be imported, it was being
imported by [...] /HuoChessConsole/HuoChessConsole.vcxproj: Imported project:
"//Microsoft.Cpp.Default.props" does not exist.`
Now, this looks like the project file wants some Microsoft definitions of rules for the Cpp
compiler. Should I fake these definitions to use gcc
instead? How can I do this?
Is what I want to do ever possible with xbuild
?