ALL_BUILD error when building OpenCV from source
Hello all
I am trying to build the latest OpenCV which i downloaded from Github with Visual Studio 2013 on a Windows 7 64-bit machine using cmake GUI.The build options i am using are;
- WITH_CUDA: ON
- WITH_OPENCL: OFF
- WITH_TBB: ON
- CUDA_ARCH_BIN: 6.1 (MY CARD IS A GTX 1070)
- CUDA_ARCH_PTX: 6.1
the rest is on default.When i right click ALL_BUILD and wait for it to finish i get the following output;
- C:\Users\can\Desktop\training\opencv-master\modules\dnn\src\torch\THDiskFile.cpp(330): error C2065: 'int32_t' : undeclared identifier
- C:\Users\can\Desktop\training\opencv-master\modules\dnn\src\torch\THDiskFile.cpp(330): error C2065: 'buffer' : undeclared identifier
- C:\Users\can\Desktop\training\opencv-master\modules\dnn\src\torch\THDiskFile.cpp(330): error C2059: syntax error : ')'
- C:\Users\can\Desktop\training\opencv-master\modules\dnn\src\torch\THDiskFile.cpp(331): error C2065: 'buffer' : undeclared identifier
- C:\Users\can\Desktop\training\opencv-master\modules\dnn\src\torch\THDiskFile.cpp(333): error C2065: 'buffer' : undeclared identifier
- C:\Users\can\Desktop\training\opencv-master\modules\dnn\src\torch\THDiskFile.cpp(336): error C2065: 'buffer' : undeclared identifier
- C:\Users\can\Desktop\training\opencv-master\modules\dnn\src\torch\THDiskFile.cpp(337): error C2065: 'buffer' : undeclared identifier
- LINK : fatal error LNK1104: cannot open file '....\lib\Debug\opencv_dnn330d.lib'
- LINK : fatal error LNK1104: cannot open file '....\lib\Debug\opencv_dnn330d.lib'
How can i resolve this issue? Any help is much appreciated :)
please be so kind and replace the (useless) screenshot with a text version of your error.
here you go :)
there's heavy work going on with the dnn module, and it seems, noone tested with vs2013 in a while.
would adding
#include <stdint.h>
to THDiskFile fix it ?I "fixed" this issue by removing "opencv_dnn","opencv_perf_dnn" and "opencv_test_dnn" from the solution, but one shouldn't get linker errors like this when building OpenCV from source?
yea, you're right. the dnn module should compile, in the 1st place.
again, the main problem is: your compiler does not know about
int32_t
, when trying to build THDiskFile.cpp.maybe you should raise an issue here ?
if the problem re-occurs with other modules i will definitely do,thanks @berak
damn thing is: the dnn module was moved into opencv main trunk, some days ago, like half a dozen other modules depend on it, a crucial part of the infrastructure.
the interesting part is;when i try to build on my home pc i only get linker errors from the dnn module,when i try to build on my work pc i get linker errors from modules like highgui,core,features2d. so i can't just "simply" remove them from the solution