I think that `CV_EXPORTS` is still required. I'm afraid that dynamic cast in user code will not work for classes created inside the library because of different vtables.