The version numbers mentioned in the error message refer to the compatibility version of the library. This is a version number that's baked in to a given dynamic library at the time it is built. When another binary is linked against that library, the compatibility version is copied in to the LC_LOAD_DYLIB
load command that tells dyld
at runtime which dynamic libraries need to be loaded. When a library is loaded by dyld
, the compatibility version is checked and if the program's version is greater that the library's version, it is an error.
When you run otool -L freetype.framework/Versions/A/freetype
you'll see that it reports its compatibility version as 16.0.0
. If you run it on sfml-graphics.framework/Versions/2.0.0/sfml-graphics
you'll see that it reports a compatibility version of 17.0.0
for freetype.framework
. So you're hitting the error case described above.
The most common cause of an error like this is running your application against an older version of a framework than the version you built it, and any linked frameworks, against. Note that "older" in this sense refers to the compatibility version and not any other version number associated with the framework (e.g., the marketing version).
Without knowing the origin of the two frameworks involved (e.g., if you built them yourself, or where you got the binaries from), it's not completely obvious where you've gone wrong. I will note however that the SFML git repository appears to have a version of freetype.framework
with the appropriate compatibility version (17.0.0
), so if you're using a binary of sfml-graphics.framework
provided by the SFML folks then picking up their FreeType framework may be your solution.