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

asked 2020-07-01 09:35:11 -0600

bkkuan gravatar image

I have this error message warning: field of class type without a DLL interface used in a class with a DLL interface I have installed CUDA and tested it out on my laptop already. Why is opencv generating such warning? How to fix this?

edit retag flag offensive close merge delete

Comments

where and how exactly do you get that error ?

can you give us more "context", please ?

berak gravatar imageberak ( 2020-07-01 09:52:49 -0600 )edit

When building ALL_BUILD in Visual Studio 2017. I added in WITH_CUDA Option

bkkuan gravatar imagebkkuan ( 2020-07-01 10:13:48 -0600 )edit

opencv version ? exact error msg & context ?

berak gravatar imageberak ( 2020-07-02 03:27:44 -0600 )edit

I have ignored this warning without any problems for years. See this post from 2016.

cudawarped gravatar imagecudawarped ( 2020-07-02 10:18:02 -0600 )edit

theres no error, but the thing is i need to use cuda because i am installing opencv for use of darknet to train model. I need to use cuda to train

bkkuan gravatar imagebkkuan ( 2020-07-02 23:58:08 -0600 )edit

opencv version is 4.2.0. exact error :warning: field of class type without a DLL interface used in a class with a DLL interface

bkkuan gravatar imagebkkuan ( 2020-07-02 23:59:08 -0600 )edit

i rebuilt it again and get the same error again.The build is successful but the thing is my cuda cant be used. not connected to my opencv.

bkkuan gravatar imagebkkuan ( 2020-07-03 00:10:53 -0600 )edit

the full error is D:/OpenCV/opencv-4.2.0/modules/core/include\opencv2/core/cuda.hpp(723): warning : field of class type without a DLL interface used in a class with a DLL interface

bkkuan gravatar imagebkkuan ( 2020-07-03 00:15:03 -0600 )edit

The error has nothing to do with CUDA working or not (at least in my experience). Can you include your output from opencv_version_win32.exe and opencv_test_cudaarithm.exe and explain what you mean by "my cuda cant be used"?

cudawarped gravatar imagecudawarped ( 2020-07-03 06:51:02 -0600 )edit