title: Using the STL with Android NDK C++
body: <p>I am trying to use the STL in an Android NDK C++ File. I try to use map, vector and various other stl classes and I cannot compile it because it doesn't find the files.</p>
  
  <p>My classes header starts with:</p>
  
  <pre><code>#pragma once
  #include &lt;map&gt;
  #include &lt;iostream&gt;
  #include &lt;stdexcept&gt;
  #include &lt;vector&gt;
  #include &lt;set&gt;
  #include &lt;list&gt;
  #include &lt;algorithm&gt;
  </code></pre>
  
  <p>and I get following error messages:</p>
  
  <pre><code>2&gt;  In file included from jni/../../Classes/Assist/Test.cpp:1:
  2&gt;  jni/../../Classes/Assist/Test.h:2:15: error: map: No such file or directory
  2&gt;  jni/../../Classes/Assist/Test.h:3:20: error: iostream: No such file or directory
  2&gt;  jni/../../Classes/Assist/Test.h:4:21: error: stdexcept: No such file or directory
  2&gt;  jni/../../Classes/Assist/Test.h:5:18: error: vector: No such file or directory
  2&gt;  jni/../../Classes/Assist/Test.h:6:15: error: set: No such file or directory
  2&gt;  jni/../../Classes/Assist/Test.h:7:16: error: list: No such file or directory
  2&gt;  jni/../../Classes/Assist/Test.h:8:21: error: algorithm: No such file or directory
  2&gt;  In file included from jni/../../Classes/Assist/Test.cpp:1:
  </code></pre>
  
  <p>I read various posts and tried "APP_STL := stlport_static" and "APP_STL := gnustl_static" in an application.mk file but it didn't work.</p>
  
  <p>Does anyone know how I can get this to work ?</p>