<blockquote>
<p>I still don't understand why the errors were produced in Debug config.</p>
</blockquote>

<p>Maybe you are mixing the libraries of debug build and release build, in the world of c++, debug and release library do not guarantee to provide same symbol and ABI, if you mixed them together, the best case is you can not compile your program, the worst case is it may generate subtle bugs from time to time, these bugs could make you scratch your head seriously if you do not know what was happen.</p>

<p>On windows, things become even more complicated(arggghhhh), your debug/release library need to link to correct runtime library, do not mixed them together if you do not want to spend several days, weeks even months to find out those evil bugs(I know a company confuse by those bugs more than 10 years, ridiculous?But this is true case).</p>

<p>Open your vc project, go to properties-.&gt;C/C++-&gt;Code generation-&gt;Runtime library</p>

<p>There will be four types of library to choose</p>

<p>MD, MDd, MT, MTd</p>

<p>The library will small d means debug, without it means release, "M" mean multithread(old vc provide single thread lib, I think it is obsolete now)."D" mean dynamic, "T" mean static. If it is dynamic, that means you will need the dll come with vc if you want your program able to run, if it is static, that means you would not need them(but I haven't tried on this one, please correct me if I am wrong).</p>

<pre><code>set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
</code></pre>

<p>I think you are right, the meaning of ON is same as true. You would not need this if you compile the armadillo as static lib. Go to properties-&gt;General-&gt;Configuration type-&gt;set it to static library</p>

<pre><code>add_definitions(-DARMA_64BIT_WORD)
add_definitions(-DNOMINMAX)
</code></pre>

<p>This is same as adding macro definition in the project</p>

<p>ex : <br>
      #define NOMINMAX</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/613#issuecomment-209551198">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFEbHS7LYXTNw45iQ7v3S_lhsP-hmks5p3SUagaJpZM4IFlbq.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/issues/613#issuecomment-209551198"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>