Ask Your Question
4

OpenCV Build process warning : field of class type without a DLL interface used in a class with a DLL interface

asked 2015-04-23 11:07:32 -0600

pulp_fiction gravatar image

I just installed CUDA 7.0 and generated the OpenCV makefiles for VisualStudio 2013 x64 through CMake. While building in the Debug configuration in VS2013, I have tons of warnings like these and its taking hell longer 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

How do I resolve the warnings??

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 ...
(more)
edit retag flag offensive close merge delete

Comments

Anyone has/had this issue? Plz help!!

pulp_fiction gravatar imagepulp_fiction ( 2015-04-24 02:33:06 -0600 )edit

This is happening to me right now, as I type this. CUDA 6.5, OpenCV 3.0.0. Generated build with Cmake 3.2.3 on 32-bit Widows Vista, compiling on VC++2010 Express. Everything seems to be building in spite of the compiler warnings, albeit at a much slower than expected rate.

RpBot gravatar imageRpBot ( 2015-06-15 00:09:10 -0600 )edit
1

i'm also getting lots of these warnings: Warning 77 warning : base class dllexport/dllimport specification differs from that of the derived class D:\GitHub\opencv\modules\core\include\opencv2\core.hpp 98 1 opencv_core

using VC++2013 on windows 7 64bit, CUDA 6.5, OpenCV on Git Itseez

and compiling fails with: Error 161 error C2220: warning treated as error - no 'object' file generated d:\github\opencv\modules\cudev\include\opencv2\cudev\grid\detail\transform.hpp 299 1 opencv_core

how to solve this?

cvandert gravatar imagecvandert ( 2015-06-20 16:41:40 -0600 )edit

I have exactly the same problem, could you please help me???

jenn_tm22 gravatar imagejenn_tm22 ( 2015-08-27 07:39:41 -0600 )edit
1

I have the same warning, searching for help. My case: vs2013+CUDA7.5+openCV 3.10 from github master branch.

immer gravatar imageimmer ( 2016-01-02 15:53:42 -0600 )edit

I've got the same problem with the absolutly same case.

rvncerr gravatar imagervncerr ( 2016-01-12 21:02:01 -0600 )edit

I have this prob too!! Is there anyone who solved that??

busrakkk gravatar imagebusrakkk ( 2016-01-15 01:07:58 -0600 )edit

may be this post could help you

LBerger gravatar imageLBerger ( 2016-01-15 01:44:32 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-01-15 19:42:56 -0600

mozzis gravatar image

The warnings are due to a problem with Visual C++ compilation of template members of an exported class. I have no idea whether this is due to a violation of the C++ ISO standard or whether it is in one of those "gray areas." Although best practice is certainly not to have tons of warnings show up in your build output, in this case you can work around this by turning off "OPENCV_WARNINGS_ARE_ERRORS" in the OPENCV node in the CMAKE GUI. The warnings will still show up, but your build will complete anyway (and the result will probably run.)

edit flag offensive delete link more

Question Tools

4 followers

Stats

Asked: 2015-04-23 11:07:32 -0600

Seen: 11,808 times

Last updated: Jan 15 '16