Open nneonneo opened 9 years ago
For example, when building OpenCV, these libraries are included in the output directory:
If we included these libraries in ofxOpenCv, the problem would disappear.
the problem with including this libraries is that we are already including libpng through cairo and all of them thorugh freeimage so including them again with opencv produces some clashes when compiling applications that use for example opencv and ofImage. there should be a way of making freeimage publish those symbols so opencv functions can use them too, but not sure if it's possible
On MSVC at least, I compiled ofxFern with these libraries added to ofxOpenCv, and included some ofImage.loadImage calls. No linker errors were seen.
On other platforms, I am not sure if this problem exists.
My concern is that if we do this and it does clash on other systems it means recompiling libs and also bloats the size with redundant libraries (I think there are like 3 zlib.libs currently already). Does this require a recompile of the openCV libs or just the inclusion of those libraries because if it is the latter I think it would be better to have those libraries included with the addon rather than the core addon.
Attempting to call
cvSaveImage
/cvLoadImage
fromhighgui.h
results in linker errors on Windows (possibly other platforms) because the OpenCV libs are missing libpng, libjpeg and libtiff.This issue was discovered while trying to compile ofxFerns on Windows, because the FERNS code uses these two functions.
The simplest fix would probably be to include precompiled versions of these libs with the OpenCV libs.