title: Cannot compile with makefile - undefined reference to `boost::re_detail
body: <p>I got an assignment to improve running time of some code. The only problem is, I can't even compile it to run it on my machine in the first place. Every time I try, it stops somewhere in the midst of compiling saying this:</p>
  
  <blockquote>
    <p>"undefined reference to `boost::re_detail::put_mem_block(void*)'
    collect2: ld returned 1 exit status make: <em>*</em> [cpu] Error 1"</p>
  </blockquote>
  
  <p>This is how makefile looks:</p>
  
  <pre><code>SHELL = /bin/bash
  
  OBJECTS = main.o atom.o molecule.o charges.o pdb.o asa.o amino.o chain.o addition.o string_operation.o pdb_peptide.o protein_chain.o residue_atom.o chain_residue.o residue_contact.o atom_grid.o circles.o atom_space_calculations.o
  
  OBJDIR = obj
  
  VPATH = src:src/ext:$(OBJDIR)
  
  CFLAGS = -O3 -Wall -lm -lboost_regex -L/usr/local/boost/lib
  
  
  HDIRS = src,src/ext,src/qt_redistributable, usr/lib, usr/local/lib, usr/local/lib/include/boost, /usr/local/lib/lib/
  IOPTS = $(addprefix -I, $(HDIRS))
  
  cpu : $(addprefix $(OBJDIR)/, $(OBJECTS) $(CPUOBJS))
      g++ $(CFLAGS) -o mcpu $^ 
  
  $(OBJDIR)/%.o : %.cpp
      g++ $(CFLAGS) $(IOPTS) -c $&lt; -o $@
  
  clean : 
      rm obj/*.o $(PROG)
  </code></pre>
  
  <p>I'm using Linux Mint x64 and I have tried everything I googled out. Installed the whole boost library in usr/local/lib (for no obvious reason because it didn't help), tried to edit LD PATH (I'm very new to Linux and I have no idea if that went right) and lots of stuff, but this thing doesn't seem to go through. Any help appreciated.</p>