Ask the Expert

How do I port a Unix makefile to Windows 2000/VS.NET?

  1. How do I port a Unix makefile to Windows 2000 (Visual Studio .NET)?
  2. 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:

  1. 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.

  2. In the Unix makefile, get the list of files that are compiled.

  3. 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.

  4. Add the Unix files to the Visual Studio project.

  5. In the project properties, add the defines to the debug and release projects as required.

This was first published in April 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: