title: How to use GLM in Android NDK Application
body: <p>I am currently trying to port my OpenGL application to Android and am stuck on how to import and build GLM <a href="http://glm.g-truc.net/" rel="nofollow noreferrer">http://glm.g-truc.net/</a> properly. I have no trouble using GLM in standard C++ apps, however I am pretty new to the NDK. I have tried all other solutions posted around the web with no luck. Here is what I have so far:</p>
  
  <p>I am using the latest version of GLM (0.9.4)</p>
  
  <p>My .cpp file contains:</p>
  
  <pre><code>    #include &lt;glm\glm.hpp&gt;
  </code></pre>
  
  <p>My Android.mk file looks like:</p>
  
  <pre><code>    LOCAL_PATH:= $(call my-dir)
  
      include $(CLEAR_VARS)
  
      LOCAL_MODULE    := libgl2jni
      LOCAL_CFLAGS    := -Werror
      LOCAL_SRC_FILES := gl_code.cpp
      LOCAL_LDLIBS    := -llog -lGLESv2
  
      APP_STL := gnustl_static
      LOCAL_C_INCLUDES += \Development\OpenGL\glm-0.9.4.0\
  
      include $(BUILD_SHARED_LIBRARY)
  </code></pre>
  
  <p>**\Development\OpenGL\glm-0.4.0** is the location of the GLM files on my  C drive</p>
  
  <p>Upon building, I receive this error:</p>
  
  <pre><code>   In file included from jni/gl_code.cpp:28:0,
         \Development\OpenGL\glm-0.94.0\glm\glm.hpp:86:18: fatal error: limits: No such file or directory
  </code></pre>
  
  <p>This resembles codemonkey's problem <a href="https://gamedev.stackexchange.com/questions/47128/android-ndk-build-cant-find-glm-headers">https://gamedev.stackexchange.com/questions/47128/android-ndk-build-cant-find-glm-headers</a> where the 'APP_STL := gnustl_static' was suggested.</p>
  
  <p>It appears that my source files are correctly setup, however there is some sort of compiler problem that I cannot identify. Any help is greatly appreciated!</p>