{"action":"created","issue":{"url":"https://api.github.com/repos/shogun-toolbox/shogun/issues/4231","repository_url":"https://api.github.com/repos/shogun-toolbox/shogun","labels_url":"https://api.github.com/repos/shogun-toolbox/shogun/issues/4231/labels{/name}","comments_url":"https://api.github.com/repos/shogun-toolbox/shogun/issues/4231/comments","events_url":"https://api.github.com/repos/shogun-toolbox/shogun/issues/4231/events","html_url":"https://github.com/shogun-toolbox/shogun/issues/4231","id":311695470,"number":4231,"title":"Linker error 2038 msvc 2015 debug build","user":{"login":"fyoda","id":37776179,"avatar_url":"https://avatars1.githubusercontent.com/u/37776179?v=4","gravatar_id":"","url":"https://api.github.com/users/fyoda","html_url":"https://github.com/fyoda","followers_url":"https://api.github.com/users/fyoda/followers","following_url":"https://api.github.com/users/fyoda/following{/other_user}","gists_url":"https://api.github.com/users/fyoda/gists{/gist_id}","starred_url":"https://api.github.com/users/fyoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyoda/subscriptions","organizations_url":"https://api.github.com/users/fyoda/orgs","repos_url":"https://api.github.com/users/fyoda/repos","events_url":"https://api.github.com/users/fyoda/events{/privacy}","received_events_url":"https://api.github.com/users/fyoda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-04-05T17:09:43Z","updated_at":"2018-04-09T14:37:46Z","closed_at":null,"author_association":"NONE","body":"Hello everyone,\r\n\r\nI'm going to use shogun on windows. I'm having a problem installing it with vcpkg. But I have already opened an issue for that.\r\nIn the meanwhile, I'm trying to use CMAKE to generate the MSVC 2015 Win64 solution and generate the debug and release build.\r\nThe release build works fine. I have tried it with the minimal usage examples [here reported](https://github.com/shogun-toolbox/shogun/wiki/Minimal-library-usage).\r\nUnfortunately, I'm getting LNK2038 error when using the debug build of the library in debug mode.\r\n\r\nHere I report the CMAKE log:\r\n```\r\nThe C compiler identification is MSVC 19.0.24215.1\r\nThe CXX compiler identification is MSVC 19.0.24215.1\r\nCheck for working C compiler: E:/Software/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe\r\nCheck for working C compiler: E:/Software/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works\r\nDetecting C compiler ABI info\r\nDetecting C compiler ABI info - done\r\nCheck for working CXX compiler: E:/Software/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe\r\nCheck for working CXX compiler: E:/Software/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works\r\nDetecting CXX compiler ABI info\r\nDetecting CXX compiler ABI info - done\r\nDetecting CXX compile features\r\nDetecting CXX compile features - done\r\nCould NOT find CCache (missing: CCACHE CCACHE_VERSION) \r\nUsing system's malloc\r\nCould NOT find GDB (missing: GDB_COMMAND GDB_VERSION) \r\nCould NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) (Required is at least version \"1.8.6\")\r\ndir='C:/Users/myUser/Downloads/shogun-shogun_6.1.3/shogun-shogun_6.1.3/src'\r\ndir='C:/Users/myUser/Downloads/shogun-shogun_6.1.3/shogun-shogun_6.1.3/build/src'\r\nCould NOT find CxaDemangle (missing: HAVE_CXA_DEMANGLE) \r\nCould NOT find CxaDemangle (missing: HAVE_CXA_DEMANGLE) \r\nCould NOT find Eigen3 (missing: EIGEN_INCLUDE_DIR) (Required is at least version \"3.1.2\")\r\nCould NOT find OPENCL (missing: OPENCL_LIBRARY OPENCL_INCLUDE_DIR) \r\nCould NOT find ViennaCL (missing: VIENNACL_INCLUDE_DIR VIENNACL_ENCODED_VERSION OpenCL_INCLUDE_DIRS OpenCL_LIBRARIES) (Required is at least version \"1.5.0\")\r\nCould NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) \r\nCould NOT find TFLogger (missing: TFLogger_DIR)\r\nA library with BLAS API not found. Please specify library location.\r\nLAPACK requires BLAS\r\nCould NOT find GLPK (missing: GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_PROPER_VERSION_FOUND) \r\nCould NOT find CPLEX (missing: CPLEX_LIBRARY CPLEX_INCLUDE_DIR) \r\nCould NOT find MOSEK (missing: MOSEK_DIR MOSEK_INCLUDE_DIR MOSEK_LIBRARY MOSEK_LIBRARIES) \r\nCould NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR) \r\nCould NOT find JSON (missing: JSON_INCLUDE_DIR JSON_LIBRARY) (Required is at least version \"0.11\")\r\nCould NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) \r\nCould NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) \r\nCould NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) \r\nCould NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR) \r\nCould NOT find LibLZMA (missing: LIBLZMA_INCLUDE_DIR LIBLZMA_LIBRARY LIBLZMA_HAS_AUTO_DECODER LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET) \r\nLzo includes and libraries NOT found. \r\nCould NOT find NLOPT (missing: NLOPT_LIBRARY NLOPT_INCLUDE_DIR) \r\nCould NOT find LPSOLVE (missing: LPSOLVE_LIBRARIES LPSOLVE_INCLUDE_DIR) \r\nCould NOT find ColPack (missing: COLPACK_LIBRARIES COLPACK_LIBRARY_DIR COLPACK_INCLUDE_DIR) \r\nCould NOT find ARPREC (missing: ARPREC_LIBRARIES ARPREC_INCLUDE_DIR) \r\nLinker: Default system linker\r\nCtags flavour: Exuberant\r\nFailed to locate sphinx-build executable (missing: SPHINX_EXECUTABLE) \r\nFailed to locate pandoc executable (missing: PANDOC_EXECUTABLE) \r\n===================================================================================================================\r\nSummary of Configuration Variables\r\nThe following OPTIONAL packages have been found:\r\n\r\n * OpenMP\r\n * Threads\r\n * SNAPPY\r\n * Ctags\r\n\r\n-- The following REQUIRED packages have been found:\r\n\r\n * PythonInterp\r\n\r\n-- The following OPTIONAL packages have not been found:\r\n\r\n * CCache\r\n * GDB\r\n * Doxygen (required version >= 1.8.6)\r\n * CxaDemangle\r\n * Eigen3 (required version >= 3.1.2)\r\n * ViennaCL (required version >= 1.5.0)\r\n * rxcpp\r\n * TFLogger (required version >= 0.1.0)\r\n * BLAS\r\n * GLPK\r\n * CPLEX\r\n * ARPACK\r\n * Mosek\r\n * Protobuf\r\n * JSON (required version >= 0.11)\r\n * LibXml2\r\n * CURL\r\n * ZLIB\r\n * BZip2\r\n * LibLZMA\r\n * LZO\r\n * NLopt\r\n * LpSolve\r\n * ColPack\r\n * ARPREC\r\n * Sphinx\r\n * Pandoc\r\n\r\n===================================================================================================================\r\nIntegrations\r\n  OpenCV Integration is OFF \t enable with -DOpenCV=ON\r\n===================================================================================================================\r\nInterfaces\r\n  Python is OFF \t\t enable with -DINTERFACE_PYTHON=ON\r\n  Octave is OFF \t\t enable with -DINTERFACE_OCTAVE=ON\r\n  Java is OFF \t\t enable with -DINTERFACE_JAVA=ON\r\n  Perl is OFF \t\t enable with -DINTERFACE_PERL=ON\r\n  Ruby is OFF \t\t enable with -DINTERFACE_RUBY=ON\r\n  C# is OFF \t\t\t enable with -DINTERFACE_CSHARP=ON\r\n  R is OFF \t\t\t enable with -DINTERFACE_R=ON\r\n  Lua is OFF \t\t enable with -DINTERFACE_LUA=ON\r\n  Scala is OFF \t\t enable with -DINTERFACE_SCALA=ON\r\n===================================================================================================================\r\nTo compile shogun type\r\n  make\r\n\r\nTo install shogun to C:/Users/myUser/Desktop/shogun type\r\n  make install\r\n\r\nor to install to a custom directory\r\n  make install DESTDIR=/my/special/path\r\n  (or rerun cmake with -DCMAKE_INSTALL_PREFIX=/my/special/path) to just change the prefix\r\n===================================================================================================================\r\nConfiguring done\r\nGenerating done\r\n```\r\n\r\nThe generated errors are:\r\n```\r\n\r\nC:\\Users\\myUser\\Desktop\\shoguntest\\libs\\shogun\\include\\shogun/lib/any.h(391): note: see reference to function template instantiation 'bool shogun::Any::same_type<shogun::Any::Empty>(void) const' being compiled\r\n\tlink /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:CONSOLE \"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'\" /MANIFEST:embed /OUT:..\\build_debug\\shoguntest.exe @C:\\Users\\myUser\\AppData\\Local\\Temp\\shoguntest.exe.128816.1437.jom\r\nshogun.lib(memory.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj\r\nshogun.lib(memory.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj\r\nshogun.lib(SGIO.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj\r\nshogun.lib(SGIO.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj\r\nshogun.lib(SGObject.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj\r\nshogun.lib(SGObject.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj\r\nshogun.lib(SGMatrix.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj\r\nshogun.lib(SGMatrix.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj\r\nshogun.lib(GaussianKernel.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj\r\nshogun.lib(GaussianKernel.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj\r\nshogun.lib(DenseLabels.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj\r\nshogun.lib(DenseLabels.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj\r\nshogun.lib(BinaryLabels.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj\r\nshogun.lib(BinaryLabels.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj\r\nshogun.lib(LibSVM.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj\r\nshogun.lib(LibSVM.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj\r\nshogun.lib(init.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj\r\nshogun.lib(init.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj\r\nshogun.lib(DenseFeatures.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj\r\nshogun.lib(DenseFeatures.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj\r\nshogun.lib(ShogunException.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj\r\nshogun.lib(ShogunException.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj\r\nshogun.lib(SGReferencedData.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj\r\nshogun.lib(SGReferencedData.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value \r\netc...\r\netc...\r\nLINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library\r\n..\\build_debug\\shoguntest.exe : fatal error LNK1319: 1114 mismatches detected\r\njom: C:\\Users\\myUser\\Desktop\\shoguntest\\src\\Makefile.Debug [..\\build_debug\\shoguntest.exe] Error 1319\r\njom: C:\\Users\\myUser\\Desktop\\shoguntest\\src\\Makefile [debug] Error 2\r\n18:56:36: The process \"E:\\Software\\Qt\\Tools\\QtCreator\\bin\\jom.exe\" exited with code 2.\r\nError while building/deploying project shoguntest (kit: Desktop Qt 5.9.3 MSVC2015 64bit)\r\nWhen executing step \"Make\"\r\n18:56:36: Elapsed time: 00:03.\r\n```\r\nI have also tried building the library in \"RelWithDebInfo\" but the final ouput is equal when used.\r\nWhat is wrong with my debug build of the library?"},"comment":{"url":"https://api.github.com/repos/shogun-toolbox/shogun/issues/comments/379774729","html_url":"https://github.com/shogun-toolbox/shogun/issues/4231#issuecomment-379774729","issue_url":"https://api.github.com/repos/shogun-toolbox/shogun/issues/4231","id":379774729,"user":{"login":"vigsterkr","id":30353,"avatar_url":"https://avatars1.githubusercontent.com/u/30353?v=4","gravatar_id":"","url":"https://api.github.com/users/vigsterkr","html_url":"https://github.com/vigsterkr","followers_url":"https://api.github.com/users/vigsterkr/followers","following_url":"https://api.github.com/users/vigsterkr/following{/other_user}","gists_url":"https://api.github.com/users/vigsterkr/gists{/gist_id}","starred_url":"https://api.github.com/users/vigsterkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vigsterkr/subscriptions","organizations_url":"https://api.github.com/users/vigsterkr/orgs","repos_url":"https://api.github.com/users/vigsterkr/repos","events_url":"https://api.github.com/users/vigsterkr/events{/privacy}","received_events_url":"https://api.github.com/users/vigsterkr/received_events","type":"User","site_admin":false},"created_at":"2018-04-09T14:37:46Z","updated_at":"2018-04-09T14:37:46Z","author_association":"OWNER","body":"@fyoda but the libshogun (c++ examples) compiles fine?"}}
{"actor":{"display_login":"vigsterkr"}}