0

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 ?

Community
  • 1
  • 1
  • Perhaps this may help you: https://stackoverflow.com/questions/35390905/qt-creator-failed-on-running-program-when-linking-usr-local-lib – HappyCactus Feb 17 '16 at 21:39

1 Answers1

0

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?

zeFrenchy
  • 6,541
  • 1
  • 27
  • 36