Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to export a Makefile from a Visual Studio 2015 C++ project

I googled a lot and saw some old posts that it was possible till VS 2008?

But now i can't find the option "export makefile" anymore..

Is there now another way to do this?

like image 711
slaesh Avatar asked Dec 04 '15 07:12

slaesh


People also ask

Can Visual Studio generate a Makefile?

To create a makefile project in Visual Studio From the Visual Studio main menu, choose File > New > Project and type "makefile" into the search box. If you see more than one project template, select from the options depending on your target platform.

How do I use Makefile code in Visual Studio?

If your installation of make is not available in the default path, you can configure it in VS Code at File > Preferences > Settings > Extensions makefile. To compile and link the project, you can add a Makefile to the root of the project folder. It will be detected automatically by the extension.

What is a Makefile in CPP?

C++ Makefile. A makefile is nothing but a text file that is used or referenced by the 'make' command to build the targets. A makefile also contains information like source-level dependencies for each file as well as the build-order dependencies.


Video Answer


1 Answers

I googled, too, with the same result: There really seems to be no way to create a Makefile from a given VS 2015 solution. The closest I got was MakeItSo. It supports VS 2010 but is open source, so maybe you can adapt it to your needs.

My recommendation is using CMake. Yes, you will have to invest some effort to getting used to it and to convert the project definitions. But managing CMake definitions is much easier than clicking through solution and project property dialogs.

And then you get your Makefile is a nice side effect.

like image 77
TobiMcNamobi Avatar answered Oct 16 '22 02:10

TobiMcNamobi