23

I have just downloaded a open source project which is said to be compiled using visual studio c++. It contains 3 makeFiles (makeFile, makeFile(1) and makeFile(2) ) I always open programs in VS using the .sln files and now I dont know what to do with this makeFile. can anyone instruct me how to deal with it please.

regards

FractalSpace
  • 5,577
  • 3
  • 42
  • 47
Hossein Dolatabadi
  • 431
  • 3
  • 7
  • 13
  • 1
    Without seeing the actual makefiles it's hard to say but first I would try this, menu File/New/Project ... Select makefile project – john Apr 04 '13 at 06:12
  • Did you try following the instructions that came with the download? It would help a lot to include at least the name of the project. – David Schwartz Apr 04 '13 at 06:16
  • possible duplicate of this question (http://stackoverflow.com/questions/15061381/convert-a-makefile-to-a-vs-project). In the shell (I'm not sure if the Win shell will do it, if not try with `Cygwin`), try to go to the directory of the main makefile and type `make` – RSFalcon7 Apr 04 '13 at 10:44
  • Possible duplicate of [How to use makefiles in Visual Studio?](http://stackoverflow.com/questions/314553/how-to-use-makefiles-in-visual-studio) – jrh May 08 '17 at 12:52

4 Answers4

4

You may try NMake. See NMake Reference and Stackoverflow post.

NMake is included with Visual Studio. You may try with NMake shipped with the edition of Visual Studio you may want to use.

Community
  • 1
  • 1
Vivek Jain
  • 3,811
  • 6
  • 30
  • 47
  • 6
    -1: He may or may not have Googled it, but *I* did, and this was the top result. Your answer was helpful to me and no doubt anyone else with the same question, but it would have been equally helpful *without* the attitude :) – Ozzah Sep 15 '13 at 23:14
  • 4
    @Ozzah, I didn't mean to show any attitude. I was just being curious if the asker has Googled and has found anything. I understand that questions like these are more suited in comments rather than in answers. Thanks for pointing this out. I have edited my answer. – Vivek Jain Sep 16 '13 at 06:41
4

If you are only familiar with Visual Studio projects and solutions, dealing with makefiles can be a challenge. The following link will give you a good introduction to makefiles from a Visual studio perspective.

An introduction to Makefiles for Visual Studio developers

Translating Linux makefiles to Visual Studio solution will be a manual effort.

NMake looks promising. However, the following link takes a simple Makefile and explains some fundamental issues that one may encounter.

Makefiles in Windows

ap-osd
  • 2,624
  • 16
  • 16
1

VS2017 and cross-platform dev with make linux binaries

If you're working on windows 10, you can make make work and compile linux binaries:

  • have lxss installed, and gdb server, ssh server installed:

    sudo apt update && sudo apt install -y build-essential gdbserver openssh-server

  • make sure you can connect through ssh to your local machine:

    sudo vi /etc/ssh/sshd_config && sudo service ssh start

  • make sure you have linux development with c++ packages installed (VS2017 install)

  • make sure you configured your connexion to lsxx through ssh in VS/tools/options/connection manager ("connection" in search).

  • make sure to have a linux project (new project/other languages/vc++/crossplatform/linux)

  • yet, add you make commands in project/properties.

Soleil
  • 6,404
  • 5
  • 41
  • 61
0

I've just run into the same problem and for me the solution: open "VS2012 Native Command Prompt" the name varies over different versions of MSVS. then simply type 'nmake makefile.vc'. nmake is the command, makefile.vc is your own makefile in your local folder. and it is done (if no further errors occur)

Attila
  • 1