Q

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

Dig deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

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:

SearchCloudComputing

SearchSoftwareQuality

SearchSOA

TheServerSide

SearchCloudApplications

Close