Problem with libpng.dylib from freetype 2.5.3

I installed freetype-2.5.3 on OS X (10.9.4) in my local directory where I parked all the science software (/ Users / t / Science / local) and now my other codes are getting confused i.e.

: / Users / t> do dyld: Symbol not found: __cg_png_create_info_struct Link to: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO Expected in: /Users/t/Science/local/lib/libPng.dylib in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO make: error: Can't find xcodebuild, make sure Xcode folder path is set correctly! make: error: you can set the Xcode folder path with / usr / bin / xcode -select -switch: / Users / t> / usr / bin / xcode-select -p /Applications/

Xcode's path looks ok. How do I get libPng.dylib back from my system to default?

Many thanks!


source to share

4 answers

I had this problem because I installed libpng using brew. Running the following command resolved the issue:

brew uninstall libpng

And if you want both the default mac libpng and this one ... good luck. I had to install / uninstall libpng using brew.



It looks like you have replaced libpng, which was built with the "__cg_" prefix on its exported names. You can try reinstalling libpng from source using

"- with-Libpng prefix = __ _ CG"

configure, which may be related to how libpng was installed previously. This option was made available in libpng16 (libpng-1.6.0, but not fully functional before libpng-1.6.3).



I suspect the problem is that you set the environment variable DYLD_LIBRARY_PATH and pointed it to / Users / t / Science / local / lib ... which will cause the system to pick up YOUR libpng when it tries to resolve the path to it libpng.

Do not do this. If you find that the DYLD_LIBRARY_PATH parameter "fixes" some problems, this is almost certainly not the actual solution to the problem. Most likely you have the wrong dylibs in your libraries, so the resulting link is wrong.



Removed line LIBS += -L/opt/local/lib

from .pro file.



All Articles