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