Can't I build another version?
I have version opencv4.1 and my co-worker have version opencv4.3. I made a shared library with opencv and gave it to him. But he got this error.
when compile
/usr/bin/ld: warning: libopencv_imgproc.so.4.1, needed by lib/libgbhealth.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: warning: libopencv_core.so.4.1, needed by lib/libgbhealth.so, not found (try using -rpath or -rpath-link)
when runtime
error while loading shared libraries: libopencv_imgproc.so.4.1: cannot open shared object file: No such file or directory
ldconfig is registered and also has an openv.conf in ll /etc/ld.so.conf.d/ But when ldconfig -p | grep imgproc, There was no indication of libopencv_imgproc.so.4.1.
Then, is the library that I made available only in version 4.1 of openv?
Yes you can, but not on same currently folder. Created another folder.
@supra56 Thank you for your reply You mean that if I make a library with version 4.1, a co-worker with version 4.3 should build version 4.1 openv separately and have it in a different folder?
youre trying to distribute a binary which depends on opencv4.1 libs (on the machine it has to run on)
why even do this ? distribute src code, that ppl can build against their local libs !
or make everyone use the same version (that's what git is for, no ?)
you can also build static libs/executables, which no more need opencv so's at runtime
@berak Because I want to create a library that is not related to the user version,
but people with different versions of openv don't seem to be able to use my library. Like you said, I made a static library.
I think I've never heard of ppl. I'll have to study it. Thank you! That was very helpful.
no, meant was : build static opencv libs, and link yours against that,
then you don't need another opencv install on the other machine
Aha, I understand. When I build an opencv, I'll use "cmake -DBUILD_SHARED_LIBS=OFF .." to build.
@jhj.Do you meant DLL(Dynamic Link Library)?
No. You can't do that. Every new version of OpenCV x.x had new library. But it will not work to shared your friend. Sorry, I misread your first question.