How to compile open source framework in Visual Studio C++, that has "makefile" only and no solution file?
views:
481answers:
5Unfortunately there is no silver bullet for this kind of change. Make and Visual Studio C++ style build are very different beasts. While they can do very similar operations, they can also have wildly different structures which makes providing a simple guide very difficult.
IMHO, the best way to achieve this is to start a new C++ project. Add in all of the existing files and go through the make file step by step attempting to convert every action to the equivalent C++ action.
If all you need is a self-built binary that you can link to with VC (i.e. no integration into existing VS solution) then have a look at MSys. It allows you to use GNU make together with VC. So you can use the GNU build system delivered with the OS project, while compiling with VC.
First make sure that the code can run on Windows. Open-source C++ code often depends on POSIX. If that is the case then you'll need to install MinGW or Cygwin.
If you are not familiar with cross-platform programming, then this project may be a painful task. (EDIT: This is speaking from my own personal experience. I do not intend to discourage you. Btw, it's the painful projects that you learn most from!)