我正在尝试在Visual Studio 2013中使用shark。我已经从NuGet下载了boost,并使用VS本身编译了shark的二进制文件。当在程序中使用shark时,我得到了链接错误-
error LNK2019: unresolved external symbol "void __cdecl shark::csvStringToData(class shark::LabeledData<class shark::blas::vector<double>,unsigned int> &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,enum shark::LabelPosition,char,char,unsigned int)" (?csvStringToData@shark@@YAXAAV?$LabeledData@V?$vector@N@blas@shark@@I@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4LabelPosition@1@DDI@Z) referenced in function "void __cdecl shark::importCSV<double>(class shark::LabeledData<class shark::blas::vector<double>,unsigned int> &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,enum shark::LabelPosition,char,char,unsigned int)" (??$importCSV@N@shark@@YAXAAV?$LabeledData@V?$vector@N@blas@shark@@I@0@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4LabelPosition@0@DDI@Z) c:\Users\sgondala\documents\visual studio 2013\Projects\ConsoleApplication2\ConsoleApplication2\ConsoleApplication2.obj ConsoleApplication2
我已经在include目录中包含了Shark include。我还在链接器->通用->附加库依赖C:\Users\sgondala\Downloads\Shark-3.0.0\build\lib中包含了shark构建库
我是visual studio的新手,所以我怀疑我链接了错误的东西。
发布于 2017-08-16 00:19:13
这可能是一个老问题,但我得到的类似错误的帮助是在Linker --> Input --> Additional Dependencies下并添加shark_debug.lib。
https://stackoverflow.com/questions/42784785
复制相似问题