6

How to compile open source framework in Visual Studio C++, that has "makefile" only and no solution file?

Roman Kagan
  • 10,440
  • 26
  • 86
  • 126
  • No one giving answer feels this question should be up voted. Strange. – Piotr Dobrogost Jul 24 '09 at 16:35
  • 2
    Perhaps they don't find the question all that interesting. I answer quite a lot of questions that don't really interest me, to gain rep, be generally helpful and sometimes as a kind of penance. –  Jul 24 '09 at 17:11

6 Answers6

7

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

JaredPar
  • 733,204
  • 149
  • 1,241
  • 1,454
2

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.

sbi
  • 219,715
  • 46
  • 258
  • 445
2

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

StackedCrooked
  • 34,653
  • 44
  • 154
  • 278
1

Why not look on this as a chance to learn some new techologies, such as MinGW, which should have few problems compiling the code.

1

If you intend to continue to support multiple platforms you might consider moving to a cross-platform build system like cmake or waf.

Darryl
  • 5,907
  • 1
  • 25
  • 36
0

MSVC supports its own flavour of the make utility thru nmake, but there are several differences vs the GNU make (ie. see Use the same makefile for make (Linux) and nmake(Windows)).

So you may need to edit the makefile (several compiler & linker options wont apply to start with).

Community
  • 1
  • 1