MinGW - make: cc: Command not found
<p>I have recently started using MinGW and I am having trouble getting <code>make</code> working on Windows. My directory structure is like this:</p>

<pre><code>Makefile
p001.cpp
p002.cpp
p003.cpp
bin\
</code></pre>

<p>My <code>Makefile</code> looks like this:</p>

<pre><code>CC=g++
BIN=bin

%: p%.cpp
    $(CC) p$*.cpp -o $(BIN)/p$*
</code></pre>

<p>However when I use <code>make</code> I get the error:  </p>

<pre><code>&gt; make 001
cc p001.cpp -o bin/p001
make: cc: Command not found
make: *** [001] Error 127
</code></pre>

<p>I am not sure what is wrong here. From what I have read, the variable <code>CC</code> defaults to <code>cc</code> when the specified compiler is not found. I don't see why that is the case. <code>g++</code> is in my system path variable, and just using <code>g++ p001.cpp -o bin/p001</code> works fine.</p>