Linker error with libpng under MacOSX

我怕爱的太早我们不能终老 提交于 2019-12-04 04:51:08

I solved with a manual installation of libpng:

  • download the source from official web site
  • in Terminal, go in the downloaded folder and launch

    cp ./scripts/makefile.darwin makefile
    make 
    sudo make install
    make clean
    
  • if it doesn't work (as in my case) open makefile with TextEdit (or equivalent) and change line

    ARCH="-arch i386 -arch x86_64"

    in

    ARCH=-arch x86_64

    (assuming, of course, your system is 64 bit).

It may not be enough. Xcode was still unable to find the library. I solved using

cd /usr/local/lib
sudo ln -s libpng15.dylib ./libpng15.15.dylib

That did the trick. Now it works fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!