I heard a lot about makefiles and how they simplify the compilation process. I'm using VS2008. Can somebody please suggest some online references or books where I can find out more about how to deal with them?
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
相关文章
- How to show location of errors, references to memb
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- How to track MongoDB requests from a console appli
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- What exactly do pointers store? (C++)
A UNIX guy probably told you that. :)
You can use makefiles in VS, but when you do it bypasses all the built-in functionality in MSVC's IDE. Makefiles are basically the reinterpret_cast of the builder. IMO the simplest thing is just to use Solutions.
The VS equivalent of a makefile is a "Solution" (over-simplified, I know).
I actually use a makefile to build any dependencies needed before invoking devenv to build a particular project as in the following:
You can also use the msbuild tool to do the same thing:
In my opinion, this is much easier than trying to figure out the overly complicated visual studio project management scheme.
The Microsoft Program Maintenance Utility (NMAKE.EXE) is a tool that builds projects based on commands contained in a description file.
NMAKE Reference
To answer the specific questions...
This link will give you a good introduction into Makefiles by mapping it with Visual Studio.
Introduction to Makefiles for Visual Studio developers
Makefiles are powerful and flexible but may not be the best solution to simplify the process. Consider CMake which abstracts the build process well which is explained in this link.
CMake for Visual Studio Developers
Makefiles and build files are about automating your build. If you use a script like MSBuild or NAnt, you can build your project or solution directly from command line. This in turn makes it possible to automate the build, have it run by a build server.
Besides building your solution it is typical that a build script includes task to run unit tests, report code coverage and complexity and more.