Building C++ project with Visual studio C++ compiler

Hi Guys

I have a C++ project with thousands of lines of code. Until now, i am using gnu make to build it under unix/linux but now i need to create C++ executables using the C++ compiler shipped with visual studio 2008.
Could someone please suggest a good way to automate the build process on windows? Does gnu make work on windows? What are my other options?
GNU make work on windows, as entire GCC suite, but if you want to use Microsoft compiler you need makefiles compatible with nmake (Microsoft version of make) or invoke the compiler from command-line directly passing appropiate arguments.
Thanks Modoran

I would probably want to modify my existing makefiles and not write new ones for windows.
So does gnu make under windows require cygwin? Are you aware of any tool which can generate Makefiles for me based on the target platform? (unix, windows or solaris)?

I don't agree with Mordoran's comment about needing the whole of the GCC suite. At least, not if you use the GnuWin32 version of make.

make and nmake just invoke commands, so you should be able to use the Microsoft compiler with the GnuWin32 version of make easily enough. Or gcc with nmake, if you wanted to. (For example, I use both nmake and make -- independently -- with things like Doxygen and GraphViz, to create my code documentation)

GnuWin32 make does have a couple of dependencies, so if you wanted to extract it from the whole GnuWin32 install, you also need to grab libiconv2.dll (char set conversion) and libintl3.dll (internationalization stuff, I guess?)

But the various compiler options will all have to be altered. And the default enviroment the make tool sets up might need tweaking. So if you have a common makefile which sets up you compiler, linker, etc. options you just have to tweak it. Elsewise you could have a lot of small changes to make.

When it comes to generation of platform specific makefiles (and VC++ projects and solutions), CMake appears to be quite popular:

Last edited on
Topic archived. No new replies allowed.