0

I just installed CUDA 7.0 and generated the OpenCV makefiles for VisualStudio 2013 x64 through CMake. While building in the Debug configuration(and Release too) in VS2013, I have tons of warnings like these and its taking hell longer(to the extent that I had to end process!) then it would normally take without WITH_CUDA checked in CMake.

I got the following:

C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/cuda.hpp(494): warning : field of class type without a DLL interface used in a class with a DLL interface

and the following:

C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return

What do these warnings mean? How do I resolve the warnings? Is the OpenCV library at fault or it is something I did?

There are many of these:

C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core.hpp(98): warning : base class dllexport/dllimport specification differs from that of the derived class
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/cuda.hpp(494): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/cuda.hpp(530): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
18>  pyr_down.cu
18>  
17>  bgfg_gaussmix2.cpp
17>  bgfg_KNN.cpp
17>  camshift.cpp
17>  compat_video.cpp
17>  ecc.cpp
17>  kalman.cpp
17>  lkpyramid.cpp
17>  optflowgf.cpp
17>  tvl1flow.cpp
17>  opencl_kernels_video.cpp
17>LINK : fatal error LNK1104: cannot open file '..\..\lib\Debug\opencv_imgproc300d.lib'
19>------ Build started: Project: opencv_shape, Configuration: Debug x64 ------
19>  Building Custom Rule C:/opencv-master_2/opencv-master/modules/shape/CMakeLists.txt
19>  CMake does not need to re-run because C:\opencv-master_2\My_Build\modules\shape\CMakeFiles\generate.stamp is up-to-date.
19>  opencv_shape_pch.cpp
19>  aff_trans.cpp
19>  emdL1.cpp
19>  haus_dis.cpp
19>  hist_cost.cpp
19>  precomp.cpp
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return
13>  
13>  
13>  
19>  sc_dis.cpp
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/types.hpp(482): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/types.hpp(483): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/types.hpp(692): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/mat.hpp(229): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/mat.hpp(2410): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/mat.hpp(2411): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/mat.hpp(3278): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/persistence.hpp(434): warning : field of class type without a DLL interface used in a class with a DLL interface
19>  tps_trans.cpp
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/persistence.hpp(436): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core.hpp(98): warning : base class dllexport/dllimport specification differs from that of the derived class
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/cuda.hpp(494): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/cuda.hpp(530): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
19>LINK : fatal error LNK1104: cannot open file '..\..\lib\Debug\opencv_video300d.lib'
20>------ Build started: Project: opencv_cudabgsegm, Configuration: Debug x64 ------
20>  Building NVCC (Device) object modules/cudabgsegm/CMakeFiles/cuda_compile.dir/src/cuda/Debug/cuda_compile_generated_mog.cu.obj
18>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return
Manish Kumar Sharma
  • 12,982
  • 9
  • 58
  • 105
  • The warnings are exactly that, warnings. Visual Studio 2013 now generates those as a warning of possible data corruption to DLL developers. The important part is the linking error message in the middle of the output you posted. That exact error came up in the duplicate I closed this as. Have a look at that answer, especially the build settings suggestions and if it doesn't help, try asking the OpenCV developers – talonmies Apr 24 '15 at 08:06
  • @talonmies : Okay, that answer and all...I will try to remove the Linking errors but the emitted warnings -What should I do about them? You said, they are exactly warnings. Thats okay but Its taking forever to build now with these warnings. I had to abort the build twice as it had exceeded 3 hrs or so. – Manish Kumar Sharma Apr 24 '15 at 08:24

0 Answers0