<p>The BUILD_SHARED_LIBS option can now turn on shared libs also for win32 target.</p>

<p>Every non-template class or single function must export it's symbols.<br>
A macro MLPACK_API is added to prereqs.hpp for this.</p>

<p>Succeeded to build the dll, cli executables as well as tests on mingw-w64 !</p>

<p>MLPACK_STATIC must be defined when using the static lib.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>&nbsp;&nbsp;<a href='https://github.com/mlpack/mlpack/pull/620'>https://github.com/mlpack/mlpack/pull/620</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Allow to build dlls</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-0">CMakeLists.txt</a>
    (5)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-1">src/mlpack/CMakeLists.txt</a>
    (11)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-2">src/mlpack/core/data/dataset_info.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-3">src/mlpack/core/dists/discrete_distribution.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-4">src/mlpack/core/dists/gaussian_distribution.cpp</a>
    (25)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-5">src/mlpack/core/dists/gaussian_distribution.hpp</a>
    (36)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-6">src/mlpack/core/dists/laplace_distribution.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-7">src/mlpack/core/dists/regression_distribution.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-8">src/mlpack/core/kernels/cosine_distance.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-9">src/mlpack/core/kernels/epanechnikov_kernel.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-10">src/mlpack/core/kernels/example_kernel.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-11">src/mlpack/core/kernels/gaussian_kernel.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-12">src/mlpack/core/kernels/hyperbolic_tangent_kernel.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-13">src/mlpack/core/kernels/laplacian_kernel.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-14">src/mlpack/core/kernels/linear_kernel.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-15">src/mlpack/core/kernels/polynomial_kernel.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-16">src/mlpack/core/kernels/pspectrum_string_kernel.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-17">src/mlpack/core/kernels/spherical_kernel.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-18">src/mlpack/core/kernels/triangular_kernel.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-19">src/mlpack/core/math/columns_to_blocks.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-20">src/mlpack/core/math/lin_alg.hpp</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-21">src/mlpack/core/math/random.cpp</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-22">src/mlpack/core/math/random.hpp</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-23">src/mlpack/core/math/random_basis.hpp</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-24">src/mlpack/core/optimizers/aug_lagrangian/aug_lagrangian_test_functions.hpp</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-25">src/mlpack/core/optimizers/lbfgs/test_functions.hpp</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-26">src/mlpack/core/optimizers/sgd/sgd.hpp</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-27">src/mlpack/core/optimizers/sgd/test_function.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-28">src/mlpack/core/tree/cosine_tree/cosine_tree.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-29">src/mlpack/core/util/backtrace.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-30">src/mlpack/core/util/cli.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-31">src/mlpack/core/util/cli_deleter.hpp</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-32">src/mlpack/core/util/cli_impl.hpp</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-33">src/mlpack/core/util/log.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-34">src/mlpack/core/util/option.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-35">src/mlpack/core/util/prefixedoutstream.hpp</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-36">src/mlpack/core/util/timers.hpp</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-37">src/mlpack/methods/ann/pooling_rules/max_pooling.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-38">src/mlpack/methods/ann/pooling_rules/mean_pooling.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-39">src/mlpack/methods/cf/cf.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-40">src/mlpack/methods/det/dt_utils.cpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-41">src/mlpack/methods/det/dt_utils.hpp</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-42">src/mlpack/methods/det/dtree.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-43">src/mlpack/methods/fastmks/fastmks_model.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-44">src/mlpack/methods/gmm/diagonal_constraint.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-45">src/mlpack/methods/gmm/eigenvalue_ratio_constraint.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-46">src/mlpack/methods/gmm/gmm.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-47">src/mlpack/methods/gmm/no_constraint.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-48">src/mlpack/methods/gmm/positive_definite_constraint.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-49">src/mlpack/methods/lars/lars.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-50">src/mlpack/methods/linear_regression/linear_regression.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-51">src/mlpack/methods/local_coordinate_coding/lcc.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-52">src/mlpack/methods/matrix_completion/matrix_completion.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-53">src/mlpack/methods/mvu/mvu.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-54">src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-55">src/mlpack/methods/neighbor_search/sort_policies/nearest_neighbor_sort.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-56">src/mlpack/methods/neighbor_search/unmap.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-57">src/mlpack/methods/nystroem_method/ordered_selection.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-58">src/mlpack/methods/nystroem_method/random_selection.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-59">src/mlpack/methods/pca/pca.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-60">src/mlpack/methods/radical/radical.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-61">src/mlpack/methods/range_search/rs_model.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-62">src/mlpack/methods/rann/ra_util.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-63">src/mlpack/methods/regularized_svd/regularized_svd_function.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-64">src/mlpack/methods/softmax_regression/softmax_regression_function.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-65">src/mlpack/methods/sparse_autoencoder/maximal_inputs.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-66">src/mlpack/methods/sparse_autoencoder/sparse_autoencoder_function.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-67">src/mlpack/methods/sparse_coding/random_initializer.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-68">src/mlpack/methods/sparse_coding/sparse_coding.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/620/files#diff-69">src/mlpack/prereqs.hpp</a>
    (36)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/mlpack/mlpack/pull/620.patch'>https://github.com/mlpack/mlpack/pull/620.patch</a></li>
  <li><a href='https://github.com/mlpack/mlpack/pull/620.diff'>https://github.com/mlpack/mlpack/pull/620.diff</a></li>
</ul>

<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/pull/620">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFCi6C9VT9GSKj5yaWDxgjHK--Bnmks5p38oigaJpZM4IIheY.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/pull/620"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>