[EN] HOWTO: Compile Shark Machine Learning Library on Windows using MinGW, CMake

Shark Machine Learning Library (http://shark-project.sourceforge.net/) is a modular C++ library for the design and optimization of adaptive systems. It provides methods for linear and nonlinear optimization, in particular evolutionary and gradient-based algorithms, kernel-based learning algorithms and neural networks, and various other machine learning techniques. SHARK serves as a toolbox to support real world applications as well as research in different domains of computational intelligence and machine learning. The sources are compatible with the following platforms: Windows, Solaris, MacOS X, and Linux.

You can get source here: http://sourceforge.net/projects/shark-project/files/ or thru SVN from here: http://sourceforge.net/projects/shark-project/develop.

Here http://shark-project.sourceforge.net/GettingStarted.html you can read how to compile Shark library, but installing and compiling Shark on Windows systems is not so clear for typical users.

So, to compile, you must have installed this software:

Latest MinGW (http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/).
Latest CMake (http://www.cmake.org/cmake/resources/software.html).

When you unpack Shark sources, go to Shark root directory, and create file script.bat:

mkdir <path-to-build-dir>
cd <path-to-build-dir>
<path-to-CMake-bin>\cmake.exe -G"MinGW Makefiles" <path-to-Shark-sources>
<path-to-mingw-bin>\mingw32-make.exe

For example, I unpacked Shark sources to d:\PROJECTS\NEURAL\Shark\, and there I created such script file:

mkdir d:\PROJECTS\NEURAL\Shark_bin
cd d:\PROJECTS\NEURAL\Shark_bin
"d:\WORKSHOP\CMake 2.8\bin\cmake.exe" -G"MinGW Makefiles" d:\PROJECTS\NEURAL\Shark\
"c:\MinGW\bin\mingw32-make.exe"

Example of using Shark with Qt. In .pro file add:

SHARKHOME = "d:/PROJECTS/NEURAL/Shark/"
CONFIG  = qt console
INCLUDEPATH = $${SHARKHOME}/include
win32{
   LIBS = -L$${SHARKHOME}/lib/ -lshark
}
...

That’s all!

Send feedback

Заповніть поля нижче або авторизуйтесь клікнувши по іконці

Лого WordPress.com

Ви коментуєте, використовуючи свій обліковий запис WordPress.com. Log Out / Змінити )

Twitter picture

Ви коментуєте, використовуючи свій обліковий запис Twitter. Log Out / Змінити )

Facebook photo

Ви коментуєте, використовуючи свій обліковий запис Facebook. Log Out / Змінити )

Google+ photo

Ви коментуєте, використовуючи свій обліковий запис Google+. Log Out / Змінити )

З’єднання з %s