title: how to reference Math.h in Visual Studio 2015
body: <p>I use this modf() but the compiler says "undefined reference to modf."  I already include math.h file in the project.  </p>
  
  <p>I include the path to math.h in project property->General:[Additional Include Directories] which is at "C:\ProgramData\Microsoft\AndroidNDK\android-ndk-r10e\platforms\android-19\arch-arm\usr\include."  </p>
  
  <p>I also add the linker property, Linker->Input:[Additional Dependencies] which is "libm.so" and I put the path to "libm.so" at Linker->General:[Additional Library Directories] for "C:\ProgramData\Microsoft\AndroidNDK\android-ndk-r10e\platforms\android-19\arch-arm\usr\lib" </p>
  
  <p>Below is the code to call modf()..</p>
  
  <pre><code>#include &lt;math.h&gt;
  #include "MyMath.h"
  
  double MyMath::testMod(double a, double b)
  {
      return modf(a, &amp;b);
  }
  </code></pre>
  
  <p>What else I'm missing here?  thanks.</p>
  
  <p>--------------Update Info-------------------</p>
  
  <p>I'm new to Visual Studio 2015 so this must be new feature in VS because the Error List Windows keeps switch between errors.  If I click on certain source file then rebuild the project, the error will show differently based on the selected source file.</p>
  
  <p>So the prior situation to the error above with math.h file, it's my project pulling math.h file in twice.  It pulls from these locations:</p>
  
  <p>C:\ProgramData\Microsoft\AndroidNDK\android-ndk-r10e\platforms\android-19\arch-arm\usr\include</p>
  
  <p>and</p>
  
  <p>C:\ProgramData\Microsoft\AndroidNDK\android-ndk-r10e\platforms\android-19\arch-x86\usr\include</p>
  
  <p>Notice the arch folders they are different because they are 'arch_arm' and 'arch-x86'  Now i don't know why it does that.  I'm just trying to build this project with NDK to use on android device so I want to build with arm.</p>