Linker error using build_win.cmd (Windows 10, Visual Studio 2013)

423 views
Skip to first unread message

Marianne

unread,
Dec 15, 2016, 9:40:58 AM12/15/16
to Caffe Users
As stated in the recently updated README, I want to report an error when building caffe-windows using build_win.cmd.
I changed the Visual Studio version to 12, disabled python support and enabled CMAKE_BUILD_SHARED_LIBS.

"C:\caffe-windows\build\ALL_BUILD.vcxproj" (standard target) (1) ->
"C:\caffe-windows\build\tools\caffe.bin.vcxproj" (standard target) (5) ->
(link target) ->
  caffe
.obj : error LNK2019: reference to unresolved external symbol ""void __cdecl caffe::caffe_
gpu_dot
<float>(int,float const *,float const *,float *)" (??$caffe_gpu_dot@M@caffe@@YAXHPEBM0PEAM@Z)"
in function ""public: float __cdecl caffe::Layer<float>::Forward(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@?$Layer@M@caffe@@QEAAMAEBV?$vector@PEAV?$Blob@M@caffe@@V?$allocator@PEAV?$Blob@M@caffe@@@std@@@std@@0@Z)".
[C:\caffe-windows\build\tools\caffe.bin.vcxproj]
 
 C
:\caffe-windows\build\tools\Release\caffe.exe : fatal error LNK1120: 1
 unresolved external symbol
[C:\caffe-windows\build\tools\caffe.bin.vcxproj]

   
1211 warnings
   
2 errors

elapsed time
: 00:11:07.80
ERROR
: Build failed

(error messages are translated)

As other user in this group mentioned that the dependencies are possibly not correctly added to the PATH, I added "C:\caffe-windows\build\libraries\bin;C:\caffe-windows\build\libraries\lib;C:\caffe-windows\build\libraries\x64\vc12\bin" manually in advance. Still, I get the above error in Debug as well as Release mode.

Guillaume Dumont

unread,
Dec 16, 2016, 9:27:25 AM12/16/16
to Caffe Users

Marianne

unread,
Jan 5, 2017, 10:41:26 AM1/5/17
to Caffe Users
In fact, Ninja build worked fine.

DI

unread,
Mar 12, 2017, 3:01:19 AM3/12/17
to Caffe Users
Hi,

How did u build using ninja. Can you help me. I downloaded ninja but not able to figure out how to use it. Iam trying to iinstall caffe on windows10 with cuda8.0

Thanks
DI
Reply all
Reply to author
Forward
0 new messages