Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create Visual studio solution from make files?

I have a source code for a project with their make files. I want to create a Visual Studio (2005) solution from it. Is there any direct way to do this? can anyone help me please. I spent hours for searching, but couldn't find a way to do this.

Thanks.

like image 736
Morpheus Avatar asked Nov 05 '22 14:11

Morpheus


2 Answers

Unfortunately, Microsoft removed this capability after VC++ 6.

If all you're looking to do is to build a Visual Studio project from a command line or script, you can use the devenv command to build using the settings in a project.

Something like:

devenv /build debug /project myproj myapp.sln 

Ans starting with VS2010, C++ projects will use the MSBuild system, so you can drive builds using that technology.

If you really want a makefile, you'll need to write it up by hand (or maybe there's some 3rd party tool out there that I'm unaware of).

like image 181
Michael Burr Avatar answered Nov 12 '22 15:11

Michael Burr


I'm not sure whether this solution can help you. Which I tried and it worked well in my previous projects. It need manually add the files.

  1. Create a blank VS solution/project. Add the source files into that project.
  2. Mark all source files as "Excluded from building". You can right click the files in project explorer and find the setting. So now nothing will happen when you build your project.
  3. In project setting, find something like "Custom build step". Add the commands that invoke your original build command. (You may write different build command for debug/release ). You can also set the post-build actions such to copy your result to some folder....
  4. Now you can edit and build source files.
  5. For my experience, I can even debug it after setting the executable.

Hope this can help you.

like image 30
Simon Avatar answered Nov 12 '22 13:11

Simon