9

I have a small problem with make and mingw. I usually use Linux and I am not really familiar with windows way of doing.

C:\MingGW\bin is in my path (I can launch directly g++ or sh by the windows command line) but when I try to type make I have the following error :

make: g++: command not found

I do not know which make is use (no make in C:\MinGw\bin) and I do not know the equivalent of which in windows. Do I have forgotten an essential step ?

Thanks for your help.

ThR37
  • 3,555
  • 5
  • 31
  • 38

3 Answers3

25

Try mingw32-make instead.

Tim Čas
  • 9,060
  • 2
  • 24
  • 32
2

Use this command to find out which one you're running:

for %i in (make.exe) do @echo. %~$PATH:i

It's basically the equivalent of which for Windows, assuming you know the extension. If you want a script that will check all extensions, you can find it here.


As pointed out in a comment by Chris, latter versions of Windows (Vista, 2003 Server, and Win7, I think) actually have a real equivalent called where, which may be better. Those of us still stuck back on XP can use the command above (or the big script at the other end of that link).

Community
  • 1
  • 1
paxdiablo
  • 772,407
  • 210
  • 1,477
  • 1,841
  • for a while now, windows has had the named-just-to-be-different where tool, that will tell you where the 'make' is, which you are running :P – Chris Becke Oct 29 '10 at 15:08
  • Mate, I'm still using XP :-) No Vista/Win7 for me just yet, I'll wait for Win7 SP2. – paxdiablo Oct 29 '10 at 15:12
  • 1
    Thank you ! Actually it wasn't my computer but a friend's one and it seemed that there was a problem with mingw. The make command in the path was part of the R applications (so nothing to see with c++ development). Thanks to that, I have been able to see where was the real problem ^. I will try to directly copy some of my mingw bins like make to help him. – ThR37 Oct 29 '10 at 16:03
0

Are you sure there is no make ? Once do "where make" to confirm this and check the entries you get under C:\mingW\bin. Hopefully you will get a entry mingw-32-make.exe or something like that.

All you need to do is rename (better create a copy and rename) this exe as make.exe and if you have already added the environment variable of this path then you may now be able to issue make command happily under mingw.

The same is already done for g++,gcc, etc. They might have conveniently left make the way it is. Hope this helps