Problems compiling with gcc due to #define interface struct

asked 2015-09-22 15:06:35 -0600

Hello all,

I'm having a problem trying to compile OpenCV as a static library (though this info is probably not relevant to the issue).

When I compile, I get 4 errors, 1 each dealing with destructors in: interface ISampleGrabber : public IUnknown interface ISampleGrabberCB : public IUnknown interface IMPEG2PIDMap : public IUnknown interface IEnumPIDMap : public IUnknown

(these are in cap_dshow.cpp)

The easy fix is to add distructors to these interfaces (an interface is defined by gcc as a struct), but the question is, is why is this a problem for us, but doesn't seem to be a problem for anyone else? Is there a compile option to add virtual destructors to classes/structs when they are undefined, that we don't have set? Is there something else that we may be doing wrong that gives us errors? My boss is not happy simply fixing this error, but wants to know why we're getting it.

Any and all insight appreciated

edit retag flag offensive close merge delete



this might have been fixed lately, at least for 3.0. (see here )

try a fresh git pull.

berak gravatar imageberak ( 2015-09-23 01:50:43 -0600 )edit

Sure looks like it. I made the mistake of assuming the opencv-3.0.0.exe install would be as up-to-date as necessary. Thanks!

mikegibson_dajac gravatar imagemikegibson_dajac ( 2015-09-23 09:33:20 -0600 )edit

hmm, maybe it should be made more obvious, that the prebuild binaries are useless for mingw users.

berak gravatar imageberak ( 2015-09-23 09:37:58 -0600 )edit