You can't compile C++6 without the C++6 compiler. However, once you install the command line support for the compiler/linker on the build server you will be able to access it from MSBuild or NAnt (worth a look). Also note that VS C++ 6 supported a build tool called nmake
which shipped with VS. VS knew how to generate the nmake file for your project, and this might be worth looking into.
I doubt there is a C++ 6 compiler package out there that is separate from VS. Unlike C# and other .Net languages, Microsoft did not have to publish free compilers to gain traction. However, that does not mean you can't create one yourself. They now have C++ compilers (albeit somewhat crippled) for the later versions (VS 2008 and 2010).
You need to create a directory structure that is similar to MS Dev's directory structure, and copy all the relevant files. The command line tools do not require any special registry settings to be set. You will need the command line tools (compiler, linker, nmake, etc.), the header include libraries, and the .lib
stubs to compile on a machine without MS Dev installed. It might be easiest to copy the install location and then remove the parts you don't need.
Your build tool (MSBuild, NAnt, or nmake
) would use an environment variable to find the root directory of the C++ 6 tools, and then refer to them there. Using this approach, once the single environment variable is set on everyone's computer no changes have to be made between dev machines and the build machine. Your compiler will be able to find the system headers for includes, and the linker will be able to find the requisite .lib
files for the DLLs you are using.