GPUMLib在构建时未解析外部(GPUMLib unresolved externals at build time)
我正在尝试构建GPUMLib,我得到以下错误
Error 11 error LNK2019: unresolved external symbol "public: static void __cdecl GPUMLib::Random::SetSeed(unsigned __int64,enum curandRngType)" (?SetSeed@Random@GPUMLib@@SAX_KW4curandRngType@@@Z) referenced in function _main C:\libraries\GPUMLib1\build\src\examples\DBN\DBNapp.obj Error 12 error LNK2019: unresolved external symbol "public: static void __cdecl GPUMLib::Random::Fill(class GPUMLib::DeviceArray<float> &)" (?Fill@Random@GPUMLib@@SAXAAV?$DeviceArray@M@2@@Z) referenced in function "public: void __thiscall GPUMLib::RBM::ContrastiveDivergence(int)" (?ContrastiveDivergence@RBM@GPUMLib@@QAEXH@Z) C:\libraries\GPUMLib1\build\src\examples\DBN\RBMKernels.lib(RBMKernels_generated_rbm.cu.obj) Error 13 error LNK1120: 2 unresolved externals C:\libraries\GPUMLib1\build\src\examples\DBN\Debug\DBN.exe 1可能导致这种情况的任何想法? 请注意,这是整个库中未成功构建的唯一部分
20> Build all projects 21>------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------ 21>Project not selected to build for this solution configuration ========== Build: 19 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========I am trying to build GPUMLib, and I get the following errors
Error 11 error LNK2019: unresolved external symbol "public: static void __cdecl GPUMLib::Random::SetSeed(unsigned __int64,enum curandRngType)" (?SetSeed@Random@GPUMLib@@SAX_KW4curandRngType@@@Z) referenced in function _main C:\libraries\GPUMLib1\build\src\examples\DBN\DBNapp.obj Error 12 error LNK2019: unresolved external symbol "public: static void __cdecl GPUMLib::Random::Fill(class GPUMLib::DeviceArray<float> &)" (?Fill@Random@GPUMLib@@SAXAAV?$DeviceArray@M@2@@Z) referenced in function "public: void __thiscall GPUMLib::RBM::ContrastiveDivergence(int)" (?ContrastiveDivergence@RBM@GPUMLib@@QAEXH@Z) C:\libraries\GPUMLib1\build\src\examples\DBN\RBMKernels.lib(RBMKernels_generated_rbm.cu.obj) Error 13 error LNK1120: 2 unresolved externals C:\libraries\GPUMLib1\build\src\examples\DBN\Debug\DBN.exe 1Any ideas what might be causing this ? Please note that this is the only part that is unsuccessfully built from the entire library
20> Build all projects 21>------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------ 21>Project not selected to build for this solution configuration ========== Build: 19 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========最满意答案
正如图书馆的作者所建议的那样,在src / random文件夹中,我不得不将“random.cu”重命名为“random.cpp”。 这解决了这个问题。
As the authors of the library suggested, in the src/random folder I had to rename "random.cu" to "random.cpp". This solved the problem.
更多推荐
发布评论