- How do I port a Unix makefile to Windows 2000 (Visual Studio .NET)?
- How do I compile a C program (originally written in Unix) in Visual Studio .NET?
While at first it can look quite a bit confusing to move from Unix development environments to Windows development environments, it's actually pretty straight forward. Here are the steps you should follow:
- Look at the Unix makefile and look at all defines that are set on the compiler's command line. This might be a little difficult as you'll need to probably look at various macros to find them. Once you've go the defines for both debug and release builds, you're past the hardest part.
- In the Unix makefile, get the list of files that are compiled.
- In Visual Studio .NET, start by creating a simple C++ console application. You may want to turn off precompiled headers in the wizards unless you want to add '#include "stdafx.h"' to each .C/.CPP file.
- Add the Unix files to the Visual Studio project.
- In the project properties, add the defines to the debug and release projects as required.
This was first published in April 2003