Ask Your Question

Revision history [back]

Problems compiling with gcc due to #define interface struct

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