Note that there are some explanatory texts on larger screens.

plurals
  1. POhighgui complaining that it needs >=17.0.0 when I have 20.0
    primarykey
    data
    text
    <p>This is kind of an ugly one, but I am stuck so here it goes:</p> <p>I am writing a dynamic library (henceforth 'mylib.dylib') that uses opencv (highgui and other parts) and is ultimately loaded by ffmpeg (libavfilter). The library compiles just fine. But when I try to dlopen() the dylib from within ffmpeg, I get the following error:</p> <pre><code>mylib.dylib: dlopen(mylib.dylib, 2): Library not loaded: /usr/local/lib/libpng15.15.dylib Referenced from: /usr/local/lib/libopencv_highgui.2.3.dylib Reason: Incompatible library version: libopencv_highgui.2.3.dylib requires version 17.0.0 or later, but libpng15.15.dylib provides version 16.0.0 </code></pre> <p>However, when I run <strong>otool -L /usr/local/lib/libpng15.15.dylib</strong> I get the following:</p> <pre><code>/usr/local/lib/libpng15.15.dylib: /usr/local/lib/libpng15.15.dylib (compatibility version 20.0.0, current version 20.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.0.0) </code></pre> <p>Last time I checked, 20.0.0 is later than 17.0.0, which is what highgui said it requires.</p> <p>I thought maybe it was an architecture problem (I am on a Mac running Lion, so I've encountered a lot of problems with i386/x86_64), but running 'file' on all of the libraries revealed that everything (highgui, libpng, mylib) is <strong>Mach-O 64-bit dynamically linked shared library x86_64</strong> </p> <p>I thought perhaps there was some other version of libpng hiding on my system somewhere, but the dlopen error specifically points to /usr/local/lib/libpng15.15.dylib</p> <p>There is obviously something that I am missing here -- admittedly I am no expert on how these dynamic libraries link. So if I forgot to include some pertinent info, please excuse me.</p> <p><strong>UPDATE</strong> I forgot to mention -- the lib works fine when I run ffmpeg through XCode (no dlopen error) which leads me to believe that it might have something to do with a environment variable that XCode is setting that I am not. </p> <p>Thanks!</p> <p><strong>SOLUTION</strong> 1. Don't be dumb I was using MAMP and since I was calling ffmpeg through a php script, it was using its own set of dylibs, which (surprise surprise) included libpng 16.0.0</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload