Jump to content
  • Advertisement
Sign in to follow this  
bulgurmayo

Makefiles and VC 2008

This topic is 3969 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am working on a project using gcc and make, and would like to build it using visual c++ 2008. So I have 2 questions ? 1. What is the equivalent of a makefile for VC 2008 ? 2. How can I generate this equivalent from a Makefile ? thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Visual Studio does handle some variant of makefiles (NMake specifically). I haven't used them much, however, but for existing gcc/make projects, that might be the best approach.

Alternatively, you can look into MSBuild.

But the "normal" way to do it in Visual Studio is to not use makefiles in the first place. Instead you create a project, and add the files you need to that. It's not as flexible (but usually good enough), and it's much better integrated into VS.

Or, of course, you can use some external make tool. There are plenty that work with the VC++ compiler.

Share this post


Link to post
Share on other sites
Quote:
Original post by bulgurmayo
I am working on a project using gcc and make, and would like to build it using visual c++ 2008. So I have 2 questions ?

1. What is the equivalent of a makefile for VC 2008 ?


A Makefile, but another kind of, made for Microsoft's nmake. Or a project file, if you don't mind having to launch the IDE.


Quote:

2. How can I generate this equivalent from a Makefile ?


You can't, AFAIK, although some tools might exist that'll turn a simplistic Makefile into a VS project or Makefile, but Makefiles are so flexible you'll have a very hard time finding a tool that'll automate 100% of the translation.

You could use a tool like CMake to generate GNU Makefile, VS project files, Xcode project files, etc, out of a common CMakeLists.txt file (IIRC), or another build system like CONS or Scons

Share this post


Link to post
Share on other sites
I don't want to drop gcc, because I want to keep portability to non windows platforms. But I wouldn't mind dropping make.

I am currently taking a close look at Boost.Build. I am a great fan of what the boost team produces, so I am hoping to find another jewel here.

Anybody has any experience with Boost.Build ?

Share this post


Link to post
Share on other sites
You could use GNU Make to build the executables, change the compiler from gcc to cl and your linker from ld to link and the compiler and linker flags accordingly.

That said, what you probably really want is to use CMake or Premake

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!