yes, you cannot combine parts of opencv that have different versions. they should all be of the same version. if you do mix them, expect issues. I can’t guarantee that it’ll always fail but the chances of that going well are very slim.
how did you accomplish that linkage anyway? were there particular reasons to attempt this?