GPUMLib在构建时未解析外部(GPUMLib unresolved externals at build time)

编程入门 行业动态 更新时间:2024-10-05 03:21:31
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 1

Any 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.

更多推荐

本文发布于:2023-08-07 11:30:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464106.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:unresolved   GPUMLib   externals   time   build

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!