compiling make files in visual studio 2003
Moderators: hgm, Rebel, chrisw
compiling make files in visual studio 2003
I have visual studio 2003 how can i compile make files inside it.
-
- Posts: 243
- Joined: Sat Mar 11, 2006 8:31 am
- Location: Malmö, Sweden
- Full name: Bo Persson
Re: compiling make files in visual studio 2003
You don't.
You can either use the make file, and run NMAKE from the command line, or create a project in Visual Studio and add the files to the project.
You can either use the make file, and run NMAKE from the command line, or create a project in Visual Studio and add the files to the project.
Re: compiling make files in visual studio 2003
For example i want to compile crafty what type of project i should make , should i make empty project or win32 console.
Kaustubh
Kaustubh
-
- Posts: 1494
- Joined: Thu Mar 30, 2006 2:08 pm
Re: compiling make files in visual studio 2003
A win32 console (or win64 if your compiler supports that).
Re: compiling make files in visual studio 2003
It depends on which program you want to build.
Fruit you can build in MSVS by just adding all the files to a C++ project and running it (F5 - no makefile needed, debugging works fine etc).
To compile Crafty with MSVS you need to:
1. Start a Visual Studio command prompt, not a normal Windows one.
2. In the crafty directory, there a few Makefiles. You need to make sure the one for Windows is called 'Makefile', with no extension.
3. At the command line, in the crafty directory, use the commands 'nmake clean' followed by 'nmake'
This should build crafty. If you want to attach the VS debugger to step through code you modify the makefile to use the debug flags (it explains how in the comments in the makefile). Then run crafty normally after building it and in VS with the source files added to a project use the Attach to Process command.
Good luck
Dave
Fruit you can build in MSVS by just adding all the files to a C++ project and running it (F5 - no makefile needed, debugging works fine etc).
To compile Crafty with MSVS you need to:
1. Start a Visual Studio command prompt, not a normal Windows one.
2. In the crafty directory, there a few Makefiles. You need to make sure the one for Windows is called 'Makefile', with no extension.
3. At the command line, in the crafty directory, use the commands 'nmake clean' followed by 'nmake'
This should build crafty. If you want to attach the VS debugger to step through code you modify the makefile to use the debug flags (it explains how in the comments in the makefile). Then run crafty normally after building it and in VS with the source files added to a project use the Attach to Process command.
Good luck
Dave
Re: compiling make files in visual studio 2003
Also meant to say - it does not really matter which type of VS project you use.
For crafty, when you compile from the command line it will ignore the project file. To use a project for debugging, or for Fruit, an empty project with all the source files added should be fine. The Win32 project just adds some preprocessor directives and stuff that not used by these programs since they are written to run on non-windows platforms.
Hope that makes sense - it is getting too late.
Dave
For crafty, when you compile from the command line it will ignore the project file. To use a project for debugging, or for Fruit, an empty project with all the source files added should be fine. The Win32 project just adds some preprocessor directives and stuff that not used by these programs since they are written to run on non-windows platforms.
Hope that makes sense - it is getting too late.
Dave