I'm having trouble using libpng with Xcode 4.2 on OS X 10.7.1.
My program fails to launch with the error:
dyld: Library not loaded: /usr/X11/lib/libpng15.15.dylib
and:
Reason: Incompatible library version: glsl_test requires version 20.0.0 or later,
but libpng15.15.dylib provides version 17.0.0
All I'm doing is adding /usr/X11/libpng.dylib
to the linked libraries, so where is this 'version 20' requirement coming from? Why isn't Xcode just requiring 开发者_Go百科the version that's available? How do I go about telling my program that it's OK to use version 17?
Without knowing much about the intricacies of Xcode, it sounds like something else in your program requires a later version of the libpng library. This could even be something that is implicitly included by the build environment.
I'd double-check that you have a build environment that is compatible with your intended target. I'd also double-check that you're specifying the inclusion of the library using appropriate syntax (e.g., using -lpng vs. an explicit "/usr/X11/libpng.dylib").
精彩评论