Antoine Billy February 2016

Qt + OpenCV + Mac OS -> Can't fid libpng

I am trying to use openCV within Qt Creator. I know both are correctly installed as I can run them independently. However, when I launch it from the Qt creator nice green arrow, I get this error saying that it can't find the so-called libpng16.16:

    dyld: Symbol not found: __cg_png_create_info_struct
  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /usr/local/lib/libpng16.16.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO

I tried to reinstall this library using hombrew, and add it to the DYLD_LIBRARY_PATH and/or DYLD_FALLBACK_LIBRARY_PATH as it was recommended here: import matplotlib.pyplot gives ImportError: dlopen(...) Library not loaded libpng15.15.dylib But obviously, as I am asking here, it didn't work for me...

I must admit I am kind of desperate, can you help me ?

Answers


zeFrenchy February 2016

You do not provide detailed information on how you installed OpenCV and which version of the Frameworks you are using.

Have you tried simply adding

LIBS += -L/usr/local/lib

to your project file?

Post Status

Asked in February 2016
Viewed 3,411 times
Voted 11
Answered 1 times

Search




Leave an answer