Я пытаюсь использовать сёгун на окнах. Я построил библиотеку с MSVC 2015 64bit. Ниже приведен отчет cmake:
Could NOT find CCache (missing: CCACHE CCACHE_VERSION)
Using system's malloc
Could NOT find GDB (missing: GDB_COMMAND GDB_VERSION)
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) (Required is at least version "1.8.6")
dir='C:/Users/myUser/Downloads/shogun-shogun_6.1.3/shogun-shogun_6.1.3/src'
dir='C:/Users/myUser/Downloads/shogun-shogun_6.1.3/shogun-shogun_6.1.3/build/src'
Could NOT find CxaDemangle (missing: HAVE_CXA_DEMANGLE)
Could NOT find CxaDemangle (missing: HAVE_CXA_DEMANGLE)
Could NOT find Eigen3 (missing: EIGEN_INCLUDE_DIR) (Required is at least version "3.1.2")
Could NOT find OPENCL (missing: OPENCL_LIBRARY OPENCL_INCLUDE_DIR)
Could NOT find ViennaCL (missing: VIENNACL_INCLUDE_DIR VIENNACL_ENCODED_VERSION OpenCL_INCLUDE_DIRS OpenCL_LIBRARIES) (Required is at least version "1.5.0")
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
Could NOT find TFLogger (missing: TFLogger_DIR)
A library with BLAS API not found. Please specify library location.
LAPACK requires BLAS
Could NOT find GLPK (missing: GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_PROPER_VERSION_FOUND)
Could NOT find CPLEX (missing: CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
Could NOT find MOSEK (missing: MOSEK_DIR MOSEK_INCLUDE_DIR MOSEK_LIBRARY MOSEK_LIBRARIES)
Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR)
Could NOT find JSON (missing: JSON_INCLUDE_DIR JSON_LIBRARY) (Required is at least version "0.11")
Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR)
Could NOT find LibLZMA (missing: LIBLZMA_INCLUDE_DIR LIBLZMA_LIBRARY LIBLZMA_HAS_AUTO_DECODER LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET)
Could NOT find SNAPPY (missing: SNAPPY_LIBRARIES SNAPPY_INCLUDE_DIR)
Lzo includes and libraries NOT found.
Could NOT find NLOPT (missing: NLOPT_LIBRARY NLOPT_INCLUDE_DIR)
Could NOT find LPSOLVE (missing: LPSOLVE_LIBRARIES LPSOLVE_INCLUDE_DIR)
Could NOT find ColPack (missing: COLPACK_LIBRARIES COLPACK_LIBRARY_DIR COLPACK_INCLUDE_DIR)
Could NOT find ARPREC (missing: ARPREC_LIBRARIES ARPREC_INCLUDE_DIR)
Linker: Default system linker
Could NOT find Ctags (missing: CTAGS_EXECUTABLE)
Failed to locate sphinx-build executable (missing: SPHINX_EXECUTABLE)
Failed to locate pandoc executable (missing: PANDOC_EXECUTABLE)
===================================================================================================================
Summary of Configuration Variables
The following OPTIONAL packages have been found:
* OpenMP
* Threads
-- The following REQUIRED packages have been found:
* PythonInterp
-- The following OPTIONAL packages have not been found:
* CCache
* GDB
* Doxygen (required version >= 1.8.6)
* CxaDemangle
* Eigen3 (required version >= 3.1.2)
* ViennaCL (required version >= 1.5.0)
* rxcpp
* TFLogger (required version >= 0.1.0)
* BLAS
* GLPK
* CPLEX
* ARPACK
* Mosek
* Protobuf
* JSON (required version >= 0.11)
* LibXml2
* CURL
* ZLIB
* BZip2
* LibLZMA
* SNAPPY
* LZO
* NLopt
* LpSolve
* ColPack
* ARPREC
* Ctags
* Sphinx
* Pandoc
===================================================================================================================
Integrations
OpenCV Integration is OFF enable with -DOpenCV=ON
===================================================================================================================
Interfaces
Python is OFF enable with -DINTERFACE_PYTHON=ON
Octave is OFF enable with -DINTERFACE_OCTAVE=ON
Java is OFF enable with -DINTERFACE_JAVA=ON
Perl is OFF enable with -DINTERFACE_PERL=ON
Ruby is OFF enable with -DINTERFACE_RUBY=ON
C# is OFF enable with -DINTERFACE_CSHARP=ON
R is OFF enable with -DINTERFACE_R=ON
Lua is OFF enable with -DINTERFACE_LUA=ON
Scala is OFF enable with -DINTERFACE_SCALA=ON
===================================================================================================================
To compile shogun type
make
To install shogun to C:/Users/myUser/Desktop/shogun type
make install
or to install to a custom directory
make install DESTDIR=/my/special/path
(or rerun cmake with -DCMAKE_INSTALL_PREFIX=/my/special/path) to just change the prefix
===================================================================================================================
Configuring done
Generating done
Сборка библиотеки прошла успешно, но когда я пытаюсь собрать следующий пример кода:
#include <shogun/base/init.h>
using namespace shogun;
int main(int argc, char** argv)
{
init_shogun_with_defaults();
exit_shogun();
return 0;
}
Я получаю следующую ошибку:
link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:..\build_release\shoguntest.exe @C:\Users\myUser\AppData\Local\Temp\shoguntest.exe.14740.610.jom
shogun.lib(Time.obj) : error LNK2019: unresolved external symbol __imp_timeGetTime referenced in function "public: __cdecl shogun::CTime::CTime(bool)" (??0CTime@shogun@@QEAA@_N@Z)
..\build_release\shoguntest.exe : fatal error LNK1120: 1 unresolved externals
Я не понимаю, где проблема. Библиотека построена успешно, без ошибок.
Это кажется довольно простой проблемой: вам нужно связаться с
winmm.lib
, увидеть:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd757629(v=vs.85).aspx
Других решений пока нет …