hujie-frank/SENet

unresolved external symbol "protected: virtual void __cdecl caffe::AxpyLayer

aligoglos opened this issue · 1 comments

i success to compile caffe with Axpy but when add caffe.lib to my project and want compile my project this errors occur :

 Creating library C:\Users\127051\Documents\Visual Studio 2015\Projects\C++\FaceRecFeep\x64\Release\FaceRecFeep.lib and object C:\Users\127051\Documents\Visual Studio 2015\Projects\C++\FaceRecFeep\x64\Release\FaceRecFeep.exp
1>caffe.lib(layer_factory.obj) : error LNK2001: unresolved external symbol "protected: virtual void __cdecl caffe::AxpyLayer<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@?$AxpyLayer@M@caffe@@MEAAXAEBV?$vector@PEAV?$Blob@M@caffe@@V?$allocator@PEAV?$Blob@M@caffe@@@std@@@std@@0@Z)
1>caffe.lib(axpy_layer.obj) : error LNK2001: unresolved external symbol "protected: virtual void __cdecl caffe::AxpyLayer<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@?$AxpyLayer@M@caffe@@MEAAXAEBV?$vector@PEAV?$Blob@M@caffe@@V?$allocator@PEAV?$Blob@M@caffe@@@std@@@std@@0@Z)
1>caffe.lib(layer_factory.obj) : error LNK2001: unresolved external symbol "protected: virtual void __cdecl caffe::AxpyLayer<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@?$AxpyLayer@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)
1>caffe.lib(axpy_layer.obj) : error LNK2001: unresolved external symbol "protected: virtual void __cdecl caffe::AxpyLayer<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@?$AxpyLayer@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)
1>caffe.lib(layer_factory.obj) : error LNK2001: unresolved external symbol "protected: virtual void __cdecl caffe::AxpyLayer<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@?$AxpyLayer@N@caffe@@MEAAXAEBV?$vector@PEAV?$Blob@N@caffe@@V?$allocator@PEAV?$Blob@N@caffe@@@std@@@std@@0@Z)
1>caffe.lib(axpy_layer.obj) : error LNK2001: unresolved external symbol "protected: virtual void __cdecl caffe::AxpyLayer<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@?$AxpyLayer@N@caffe@@MEAAXAEBV?$vector@PEAV?$Blob@N@caffe@@V?$allocator@PEAV?$Blob@N@caffe@@@std@@@std@@0@Z)
1>caffe.lib(layer_factory.obj) : error LNK2001: unresolved external symbol "protected: virtual void __cdecl caffe::AxpyLayer<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@?$AxpyLayer@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)
1>caffe.lib(axpy_layer.obj) : error LNK2001: unresolved external symbol "protected: virtual void __cdecl caffe::AxpyLayer<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@?$AxpyLayer@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)
1>C:\Users\127051\Documents\Visual Studio 2015\Projects\C++\FaceRecFeep\x64\Release\FaceRecFeep.exe : fatal error LNK1120: 4 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

i use windows 10 and visual studio 2015.

Sorry, I didn't use caffe on windows. You can compare the definition of Forward and Backward in Axpy layer with other standard layers in your caffe, and then modify to be consistent.