views:

103

answers:

4

Hi all!!

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.

+1  A: 

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).

Michael Burr
I don't need makefiles, but removing makefiles isn't upto me. so, I have to create a VS2005 solution from those makefiles.
Morpheus
A: 

If this is a one-off then it is easier to just create the VS project manually in visual studio.

If you are going to need to do this often look at ceating the project in something like cmake or Qt's .pro whcihc an generate makefiles and VS build files from the same defintion.

Martin Beckett
A: 

Do you want to use the makefile to build? You can create a project from existing source in VS 2005 and setup the project to use make to build (and the wizard will take you through all of this).

Mark
A: 

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.