Shark-ML / Shark

The Shark Machine Leaning Library. See more:
http://shark-ml.github.io/Shark/
GNU Lesser General Public License v3.0
493 stars 130 forks source link

problem with compiling shark with visual studio 2019 #283

Open AminDarestani2019 opened 3 years ago

AminDarestani2019 commented 3 years ago

I am Installing Shark machine learning library in my Laptop which its config is :

CPU: CoreI7 10th generation GPU: Radeon RX640 OS: Windows 10 IDE: Visual studio 2019 according to shark website help, Boost library must be installed before any action . I got the Boost library boost_1_74_0-msvc-14.2-64 from its boost website. Running the exe makes a folder C:\local\boost_1_74_0

some helps from Youtube says it is enough to install boost and use the addresses belong to this folder and some other helps says you must build it , so I did two ways separately for two kind of installing.

After that , I got the shark library from its official website or http://image.diku.dk/shark/sphinx_pages/build/html/rest_sources/downloads/downloads.html

I started to extract it and put it in a source folder and then I made a build folder near it. I run the CMAKE and put the source address in the source text box and build address in the build text box. then I made to entries to CMAKE : BOOST_ROOT:C:\local\boost_1_74_0 and BOOST_LIBRARYDIR:C:\local\boost_1_74_0\lib64-msvc-14.2 the I configured it , some messages were in the output page in the CMAKE:

CMake Warning at C:/Program Files/CMake/share/cmake-3.17/Modules/FindBoost.cmake:1179 (message): New Boost version may have incorrect or missing dependencies and imported targets Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.17/Modules/FindBoost.cmake:1303 (_Boost_COMPONENT_DEPENDENCIES) C:/Program Files/CMake/share/cmake-3.17/Modules/FindBoost.cmake:1904 (_Boost_MISSING_DEPENDENCIES) Test/CMakeLists.txt:11 (find package)

I kept going it because it was just warning and I had put the BOOST address in the CMAKE config so I generate it via CMAKE and the run the visual studio solution in ADMIN and build the shark.sln but the after a lot of compiling time , the result was : 198 projects FAILED

Visual studio makes these errors after building the shark project:

Error LNK1181 cannot open input file '..\lib\Release\shark.lib' Error C2668 'shark::size': ambiguous call to overloaded function Error C3861 'make_iterator_range': identifier not found

these errors are repeated for 230 times in shark project building process

these errors makes me confused and I don't know what to do because when shark.lib is created that building process gets completed and in the middle of building , compiler is looking for what?

another item is shark::size error is not clear for me because all the relations between library files and header files in this project is clear but compiler cannot relate them together and makes error