Compilation and use of shark machine learning C ++ Library

Source: Internet
Author: User

I. Preparations before Compilation
On the win platform, check out the latest code through svn at this address.

Download and install Cmake

Because the Shark library depends on the Boost library, you need to download the Boost Library

Ii. compilation process
(1) first, compile the Boost library into the desired library. The specific process is as follows:
Execute the following compilation command
Bjam install -- toolset = msvc-8.0 -- without-graph -- without-graph_parallel -- without-math -- without-mpi -- without-python -- without-wave -- prefix = "E: \ SDK \ boost \ bin \ vc8 "link = static runtime-link = shared runtime-link = static threading = multi debug release
Remember that the following libraries are required in the Boost compilation options.

System

Date_time

Filesystem

Program_options

Regex

Signals

Serialization

Thread

Unit_test_framework

(2) Compile the shark Library
Open cmake gui
Remember to configure BOOST_ROOT as the address of the Boost library we just generated.
I configured the generation of vc2005. You can configure it to your own vc version as needed, but remember that the vc version after the boost compilation is consistent with the current configuration.
After the configuration is complete, the project file of vc 2005 can be generated.
After being generated, open the project file in the corresponding directory and compile it to generate the lib file.

Iii. Use shark Library
Remember to add the following preprocessing options to your project. The numbers must be adjusted based on your boost version and shark version.
SHARK_VERSION_MAJOR = 3
SHARK_VERSION_MINOR = 0
SHARK_VERSION_PATCH = 0
NDEBUG
BOOST_UBLAS_NDEBUG
BOOST_PARAMETER_MAX_ARITY = 15
BOOST_FILESYSTEM_VERSION = 3
_ USE_MATH_DEFINES
NOMINMAX

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.