[mlpack] Compiling MLPACK as a shared library

Qiang Kou kellyhavel1989 at gmail.com
Fri Jan 2 20:01:34 EST 2015


Hi,

It is not hard, but may be a nightmare to compile and use a dll shared
library on Windows.

Look at the several lines from [1], change it into something like below:

if (WIN32)
  add_library(mlpack SHARED ${MLPACK_SRCS})
endif (WIN32)

You should get the* libmlpack.dll, *however, this is really not recommended.

Best,

KK

[1]
https://github.com/mlpack/mlpack/blob/master/src/mlpack/CMakeLists.txt#L22-L26

On Fri, Jan 2, 2015 at 6:17 PM, Sylvana Alpert <SAlpert at blackrockmicro.com>
wrote:

> Hi everyone,
>
>
>
> I have compiled mlpack 1.0.9 for Windows using minGW however, the result
> is a static library that I am currently using (works great, BTW!).
>
> I want to link dynamically to fully comply with the LGPL before starting
> to distribute my application but I haven’t been able to figure out how to
> compile the dynamic library. I have read about the CMake command
> “add_library” but this is not being used in the CMakeLists.txt.
>
>
>
> I apologize if this is too dumb of a question. Thanks in advance for your
> help!
>
>
>
> *Sylvana *
>
>
> ......................................................................................................
>
> _______________________________________________
> mlpack mailing list
> mlpack at cc.gatech.edu
> https://mailman.cc.gatech.edu/mailman/listinfo/mlpack
>
>


-- 
*Bueno es hablar, pero mejor es callar*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack/attachments/20150102/abd67256/attachment.html>


More information about the mlpack mailing list