title: Compiling Small Gcc Project on Windows Using MinGW
body: <p>so I've been programming in C++ for almost 2 years now, and the whole while I've had the pleasure of using an IDE (VS) with lovely project settings and automatic linking and the like. I've always stayed away from any external libraries which required me to compile via makefiles, or at least the ones which were meant for linux environments/other compilers.</p>
  <p>Anyways I now want to use a super handy utility (<a href="http://burtleburtle.net/bob/hash/perfect.html#pearson" rel="noreferrer">Bob Jenkins Perfect Minimal Hash)</a> but it requires me to compile via makefiles, not only that but using the g++ compiler.</p>
  <p>I went ahead and got the mingW32-make utility and am now trying to get it to work. Where I'm at now:</p>
  <ul>
  <li>Succesfully installed minGW</li>
  <li>Succesfully called the make utility</li>
  <li>Failed to succesfully make the project.</li>
  </ul>
  <p>The error I get is:</p>
  <blockquote>
  <p>C:\gen_progs\ph&gt;mingw32-make</p>
  <p>mingw32-make: *** No rule to make
  target <code>lookupa.c', needed by </code>lookupa.o'.  Stop.</p>
  </blockquote>
  <p>And the makefile itself:</p>
  <pre><code>CFLAGS = -O
  
  .cc.o:
      gcc $(CFLAGS) -c $&lt;
      
  O = lookupa.o recycle.o perfhex.o perfect.o
  
  const64 : $(O)
      gcc -o perfect $(O) -lm
  
  # DEPENDENCIES
  
  lookupa.o : lookupa.c standard.h lookupa.h
  
  recycle.o : recycle.c standard.h recycle.h
  
  perfhex.o : perfhex.c standard.h lookupa.h recycle.h perfect.h
  
  perfect.o : perfect.c standard.h lookupa.h recycle.h perfect.h
  </code></pre>
  <p>Now the error seems reasonable, at least from my minimal understanding of makefiles, I have all the referenced .c, .h files, however I have none of the .o files and there doesn't appear to be any instructions on how to make these. So my question/s are:</p>
  <p>am I calling the make utility wrong? Or do I need to compile the object files first? Or... do I need to add something to the make file?</p>
  <p>Again I have all the referenced .c and .h files.</p>
  <p><strong>Edit:</strong> Sorry about that I was actually missing that specific file it seems to have disapeared somewhere along the line. However, adding it back in this is the error I now get:</p>
  <pre><code>c:\gen_progs\ph&gt;mingw32-make 
  cc -O   -c -o lookupa.o lookupa.c 
  process_begin: CreateProcess(NULL, cc -O -c -o lookupa.o lookupa.c, ...) failed.
      
  make (e=2): The system cannot find the file specified. 
  mingw32-make: *** [lookupa.o] Error 2
  </code></pre>