error LNK2001: 无法解析的外部符号 cudaGetErrorString

qq_28248005 2019-09-02 09:10:57
windows7 cup VS2013 安装caffe 在用VS2013编译caffe时出现了如下错误:

错误 484 error LNK2001: 无法解析的外部符号 cudaGetErrorString
错误 485 error LNK2001: 无法解析的外部符号 cudaGetErrorString
错误 486 error LNK2001: 无法解析的外部符号 cudaGetDeviceCount
错误 487 error LNK2001: 无法解析的外部符号 cudaGetDeviceCount
错误 488 error LNK2001: 无法解析的外部符号 cudaGetDeviceProperties
错误 489 error LNK2001: 无法解析的外部符号 cudaGetDeviceProperties
错误 490 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::caffe_gpu_dot<float>(int,float const *,float const *,float *)" (??$caffe_gpu_dot@M@caffe@@YAXHPEBM0PEAM@Z)
错误 491 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::caffe_gpu_dot<float>(int,float const *,float const *,float *)" (??$caffe_gpu_dot@M@caffe@@YAXHPEBM0PEAM@Z)
错误 492 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::caffe_gpu_dot<double>(int,double const *,double const *,double *)" (??$caffe_gpu_dot@N@caffe@@YAXHPEBN0PEAN@Z)
错误 493 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::caffe_gpu_asum<float>(int,float const *,float *)" (??$caffe_gpu_asum@M@caffe@@YAXHPEBMPEAM@Z)
错误 494 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::caffe_gpu_asum<double>(int,double const *,double *)" (??$caffe_gpu_asum@N@caffe@@YAXHPEBNPEAN@Z)
错误 495 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::caffe_gpu_axpy<float>(int,float,float const *,float *)" (??$caffe_gpu_axpy@M@caffe@@YAXHMPEBMPEAM@Z)
错误 496 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::caffe_gpu_axpy<double>(int,double,double const *,double *)" (??$caffe_gpu_axpy@N@caffe@@YAXHNPEBNPEAN@Z)
错误 497 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::caffe_gpu_scal<float>(int,float,float *)" (??$caffe_gpu_scal@M@caffe@@YAXHMPEAM@Z)
错误 498 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::caffe_gpu_scal<double>(int,double,double *)" (??$caffe_gpu_scal@N@caffe@@YAXHNPEAN@Z)
错误 499 error LNK2001: 无法解析的外部符号 cudaFree D:\caffe-windows\caffe-windows\windows\caffe\common.obj caffe
错误 500 error LNK2001: 无法解析的外部符号 curandSetGeneratorOffset
错误 501 error LNK2001: 无法解析的外部符号 cudaGetLastError
错误 502 error LNK2001: 无法解析的外部符号 curandDestroyGenerator
错误 503 error LNK2001: 无法解析的外部符号 cublasDestroy_v2
错误 504 error LNK2001: 无法解析的外部符号 curandSetPseudoRandomGeneratorSeed
错误 505 error LNK2001: 无法解析的外部符号 curandCreateGenerator
错误 506 error LNK2001: 无法解析的外部符号 cudaSetDevice
错误 507 error LNK2001: 无法解析的外部符号 cudaGetDevice
错误 508 error LNK2001: 无法解析的外部符号 cublasCreate_v2
错误 509 error LNK2001: 无法解析的外部符号 "protected: virtual void __cdecl caffe::AbsValLayer<double>::Backward_gpu(class std::vector<class caffe::Blob<double> *,class std::allocator<class caffe::Blob<double> *> > const &,class std::vector<bool,class std::allocator<bool> > const &,class std::vector<class caffe::Blob<double> *,class std::allocator<class caffe::Blob<double> *> > const &)" (?Backward_gpu@?$AbsValLayer@N@caffe@@MEAAXAEBV?$vector@PEAV?$Blob@N@caffe@@V?$allocator@PEAV?$Blob@N@caffe@@@std@@@std@@AEBV?$vector@_NV?$allocator@_N@std@@@4@0@Z)

错误 510 error LNK2001: 无法解析的外部符号 "protected: virtual void __cdecl caffe::AbsValLayer<double>::Forward_gpu(class std::vector<class caffe::Blob<double> *,class std::allocator<class caffe::Blob<double> *> > const &,class std::vector<class caffe::Blob<double> *,class std::allocator<class caffe::Blob<double> *> > const &)" (?Forward_gpu@?$AbsValLayer@N@caffe@@MEAAXAEBV?$vector@PEAV?$Blob@N@caffe@@V?$allocator@PEAV?$Blob@N@caffe@@@std@@@std@@0@Z)

错误 511 error LNK2001: 无法解析的外部符号 "protected: virtual void __cdecl caffe::AbsValLayer<float>::Backward_gpu(class std::vector<class caffe::Blob<float> *,class std::allocator<class caffe::Blob<float> *> > const &,class std::vector<bool,class std::allocator<bool> > const &,class std::vector<class caffe::Blob<float> *,class std::allocator<class caffe::Blob<float> *> > const &)" (?Backward_gpu@?$AbsValLayer@M@caffe@@MEAAXAEBV?$vector@PEAV?$Blob@M@caffe@@V?$allocator@PEAV?$Blob@M@caffe@@@std@@@std@@AEBV?$vector@_NV?$allocator@_N@std@@@4@0@Z)

错误 512 error LNK2001: 无法解析的外部符号 "protected: virtual void __cdecl caffe::AbsValLayer<float>::Forward_gpu(class std::vector<class caffe::Blob<float> *,class std::allocator<class caffe::Blob<float> *> > const &,class std::vector<class caffe::Blob<float> *,class std::allocator<class caffe::Blob<float> *> > const &)" (?Forward_gpu@?$AbsValLayer@M@caffe@@MEAAXAEBV?$vector@PEAV?$Blob@M@caffe@@V?$allocator@PEAV?$Blob@M@caffe@@@std@@@std@@0@Z)

错误 513 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::caffe_gpu_gemv<double>(enum CBLAS_TRANSPOSE,int,int,double,double const *,double const *,double,double *)" (??$caffe_gpu_gemv@N@caffe@@YAXW4CBLAS_TRANSPOSE@@HHNPEBN1NPEAN@Z)

错误 514 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::caffe_gpu_gemv<float>(enum CBLAS_TRANSPOSE,int,int,float,float const *,float const *,float,float *)" (??$caffe_gpu_gemv@M@caffe@@YAXW4CBLAS_TRANSPOSE@@HHMPEBM1MPEAM@Z)

错误 515 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::im2col_gpu<double>(double const *,int,int,int,int,int,int,int,int,int,int,int,double *)" (??$im2col_gpu@N@caffe@@YAXPEBNHHHHHHHHHHHPEAN@Z)

错误 516 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::im2col_gpu<float>(float const *,int,int,int,int,int,int,int,int,int,int,int,float *)" (??$im2col_gpu@M@caffe@@YAXPEBMHHHHHHHHHHHPEAM@Z)

错误 517 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::col2im_nd_gpu<double>(double const *,int,int,int const *,int const *,int const *,int const *,int const *,int const *,double *)" (??$col2im_nd_gpu@N@caffe@@YAXPEBNHHPEBH11111PEAN@Z)

错误 518 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::col2im_nd_gpu<float>(float const *,int,int,int const *,int const *,int const *,int const *,int const *,int const *,float *)" (??$col2im_nd_gpu@M@caffe@@YAXPEBMHHPEBH11111PEAM@Z) D:\caffe-windows\caffe-windows\windows\caffe\base_conv_layer.obj caffe
错误 519 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::im2col_nd_gpu<double>(double const *,int,int,int const *,int const *,int const *,int const *,int const *,int const *,double *)" (??$im2col_nd_gpu@N@caffe@@YAXPEBNHHPEBH11111PEAN@Z) D:\caffe-windows\caffe-windows\windows\caffe\base_conv_layer.obj caffe
错误 520 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::im2col_nd_gpu<float>(float const *,int,int,int const *,int const *,int const *,int const *,int const *,int const *,float *)" (??$im2col_nd_gpu@M@caffe@@YAXPEBMHHPEBH11111PEAM@Z) D:\caffe-windows\caffe-windows\windows\caffe\base_conv_layer.obj caffe
错误 521 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::col2im_gpu<double>(double const *,int,int,int,int,int,int,int,int,int,int,int,double *)" (??$col2im_gpu@N@caffe@@YAXPEBNHHHHHHHHHHHPEAN@Z) D:\caffe-windows\caffe-windows\windows\caffe\base_conv_layer.obj caffe
错误 522 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::col2im_gpu<float>(float const *,int,int,int,int,int,int,int,int,int,int,int,float *)" (??$col2im_gpu@M@caffe@@YAXPEBMHHHHHHHHHHHPEAM@Z) D:\caffe-windows\caffe-windows\windows\caffe\base_conv_layer.obj caffe
错误 523 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::caffe_gpu_gemm<double>(enum CBLAS_TRANSPOSE,enum CBLAS_TRANSPOSE,int,int,int,double,double const *,double const *,double,double *)" (??$caffe_gpu_gemm@N@caffe@@YAXW4CBLAS_TRANSPOSE@@0HHHNPEBN1NPEAN@Z) D:\caffe-windows\caffe-windows\windows\caffe\base_conv_layer.obj caffe
错误 524 error LNK2001: 无法解析的外部符号 "void __cdecl caffe::caffe_gpu_gemm<float>(enum CBLAS_TRANSPOSE,enum CBLAS_TRANSPOSE,int,int,int,float,float const *,float const *,float,float *)" (??$caffe_gpu_gemm@M@caffe@@YAXW4CBLAS_TRANSPOSE@@0HHHMPEBM1MPEAM@Z) D:\caffe-windows\caffe-windows\windows\caffe\base_conv_layer.obj caffe
错误 525 error LNK2001: 无法解析的外部符号 cudaStreamDestroy D:\caffe-windows\caffe-windows\windows\caffe\base_data_layer.obj caffe
错误 526 error LNK2001: 无法解析的外部符号 cudaStreamSynchronize D:\caffe-windows\caffe-windows\windows\caffe\base_data_layer.obj caffe
错误 527 error LNK2001: 无法解析的外部符号 "public: virtual void __cdecl caffe::BasePrefetchingDataLayer<double>::Forward_gpu(class std::vector<class caffe::Blob<double> *,class std::allocator<class caffe::Blob<double> *> > const &,class std::vector<class caffe::Blob<double> *,class std::allocator<class


有没有小伙伴知道怎么解决?
...全文
3247 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
Qiuf0812 2022-04-01
  • 打赏
  • 举报
回复

加上之后,我无法解析的库更加多了....

weixin_44913430 2021-06-12
  • 打赏
  • 举报
回复

我尝试在附加依赖项里加上了cuart.lib,cuda.lib等,就是差什么,就加上缺的东西前缀作为依赖项,差cudaStreamSynchronize 就加上cuda.lib,然后就成功了

 

moyakxhh 2020-10-29
  • 打赏
  • 举报
回复
https://blog.csdn.net/u012348774/article/details/78901205 用的linux嘛 我找到这个没试 我用vs2017也出现这个问题
SY19790408 2020-05-28
  • 打赏
  • 举报
回复
你就解决了吗 我也遇到了 相同的问题///
qq_28248005 2019-11-23
  • 打赏
  • 举报
回复
引用 1 楼 小·资 的回复:
链接库里加入cudart.lib,能解决一些
好的,谢谢您。
小·资 2019-10-23
  • 打赏
  • 举报
回复 2
链接库里加入cudart.lib,能解决一些

579

社区成员

发帖
与我相关
我的任务
社区描述
CUDA™是一种由NVIDIA推出的通用并行计算架构,该架构使GPU能够解决复杂的计算问题。 它包含了CUDA指令集架构(ISA)以及GPU内部的并行计算引擎。
社区管理员
  • CUDA编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧