title: Makefile - C++11
body: <p>I'm trying to understand MakeFiles and I'm trying to set the CFLAGS to C++11 in my make file. I have read the following: <a href="https://stackoverflow.com/questions/10787126/makefile-modification-to-support-c11">Makefile modification to support c++11</a> I have implemented one of the solutions, however, it does not seem to work, I'm getting the same error:</p>
  
  <blockquote>
    <p>error: ‘i’ does not name a type
         for(auto i=begin; (i != end); i++)</p>
  </blockquote>
  
  <p>Here is my MakeFile:</p>
  
  <pre><code># Location of the Python Header files 
  # This is system dependant. 
  
  PYTHON_VERSION = 2.7
  PYTHON_INCLUDE = /usr/include/python$(PYTHON_VERSION)
  
  CFLAGS += -03
  CFLAGS += -std=c++0x
  CFLAGS += -pg -D_DEBUG -g -c -Wal
  # location of the Boost Python include files and library
  
  BOOST_INC = /usr/include
  BOOST_LIB = /usr/lib
  
  WAV_TARGET = /includes/Wav
  WAV_SOURCE = Wav
  
  # Compile the .wav Python and Cpp file 
  
  $(WAV_TARGET).so: $(WAV_TARGET).o
    g++ -shared -Wl, --export-dynamic ($WAV_TARGET).o -L$(BOOST_LIB) -lboost_python -
            L/usr/lib/python$(PYTHON_VERSION)/config -lpython$(PYTHON_VERSION) -o  
            $(WAV_TARGET).so
  $(WAV_TARGET).o: $(WAV_SOURCE).cpp
   g++ -I$(PYTHON_INCLUDE) -I$(BOOST_INC) -fPIC -c Wav.cpp
  </code></pre>
  
  <p>I'm probably missing something really stupid, but where am I going wrong here?</p>