开发者

Build C++ Projects with Makefile using Visual Studio 2008

开发者 https://www.devze.com 2023-02-03 22:38 出处:网络
I downloaded cpptest from internet, and I want to build it using Visual Studio 2008. The problem is that instead of .sln and vcproj file, Makefile.am is distributed, and I believe that all the all t

I downloaded cpptest from internet, and I want to build it using Visual Studio 2008.

The problem is that instead of .sln and vcproj file, Makefile.am is distributed, and I believe that all the all the necessary included file is included in the Makefile.am.

How to use Makefile.am to generate VS project files? I tried to use Cmake, but there is no CMakeList in the distribution.

Edit: Thanks to all the answers! There is a sln file distributed after all. But I am still interested to开发者_如何转开发 know the answer to my original question.


the visual studio project files for cpptest are in the win directory, not in the src directory where the makefile is..

edit

makefiles are meant to be used with GNU make. If you want that on windows, you can look at Mingw, GnuWin32 or Cygwin. But they also require gcc for compiling, so you won't really be using VS.

However, for most projects that do not have external dependencies it's no big deal if you do not have the VS project file: after all a makefile is just a list of the source files and some compilation options. To successfully build projects like cpptest, you could just create an emtpy VS project, add all source files to it, set output type to executable, build it and you're done. Eventually you can tune optimization options, but for the rest the default options will just do fine.


Go to win\VisualStudio.NET and you will find a VS solution file.


I just downloaded the archive and found the .sln file. It is under: /win/VisualStudio.NET. You can open that with VS2008 and update it, it should work.

0

精彩评论

暂无评论...
验证码 换一张
取 消