user5388874 February 2016

Using Shark machine learning library in Visual Studio C++

I'd like to use Shark library in Visual Studio 2013. They provided the following example in Shark-3.0.0\examples:

#include <shark/Core/Shark.h>
#include <iostream>

int main(int argc, char ** argv)
{
    shark::Shark::info(std::cout);
}

But, I am getting the following error:

error C1083: Cannot open include file: 'shark/Core/shark.h': No such file or directory.

In fact, the header file name in Shark-3.0.0\include\shark\Core is Shark.h.in. But, if I change #include <shark/Core/shark.h> to #include <shark/Core/shark.h.in> then I get the following error:

error C1083: Cannot open include file: 'boost/version.hpp': No such file or directory.

Answers


DevSolar February 2016

Shark is a library that comes as source package, which (as per the instructions in its README.txt) requires compilation on the target machine:

INSTALLATION / DOCUMENTATION

The entry point to the Shark library documentation is located at doc/index.html . For installation instructions, please click on "Getting started" on that page. Short version of installation guide: issue "ccmake ." in the main directory to select your build options, and afterwards issue "make" in the main directory -- you should be done (assuming Boost and CMake were installed). See the documentation for detailed instructions.

More detailed installation instructions available from the library provider.

Note that Shark seems to depend on Boost, so install that first...


Ben March 2016

This is kind of a quirk of Shark's build system. There are two "include" folders in Shar's build folder. shark.h is in one of them. You'll need to add both folders as include directories or copy shark.h..

Post Status

Asked in February 2016
Viewed 2,998 times
Voted 8
Answered 2 times

Search




Leave an answer