FreeType error when building in XCode
First some back story:
I dont know what im doing.
Thats a lie, I know a bit about what I’m doing. I’m a web developer so looking at code isn’t all gibberish, but trying to use Xcode is a new book for me. Anyway, I designed a game that was compiled in C++ using SFML on Windows, and now we are trying to bring it over to OS X (I am the only one of the group with a Mac).
Using Xcode 4.6.1 and SFML 2.0 I’ve been trying to get this damn application to build, and so far it’s been nothing but headaches. The current state of getting this thing to work is not so bad, it finally builds with no errors but the build stops and this shows up:
dyld: Library not loaded: @executable_path/../Frameworks/freetype.framework/ Versions/A/freetype Referenced from: /Users/Eric/Library/Developer/Xcode/DerivedData/ Test-haconqzbewevbwgukppsacykkpml/Build/Products/Debug/Test.app/ Contents/Frameworks/sfml-graphics.framework/Versions/2.0.0/sfml-graphics Reason: Incompatible library version: sfml-graphics requires version 17.0.0 or later, but freetype provides version 16.0.0
I just dont understand this error. I have the most updated version of FreeType. I’m not even sure what that version number is referring to considering FreeType is at 2.4.11. I can’t seem to find this error anywhere else either, any ideas?
- Compiling simple Hello World program on OS X via command line
- What is void* and to what variables/objects it can point to
- Symbol not found when using template defined in a library
- MonoTouch: Doubling Appearance Image size when Hue adjusted on Retina display
- MonoTouch.Dialog: Responding to a RadioGroup Choice
- STD linker error with Apple LLVM 4.1
Solutions Collect From Internet About “FreeType error when building in XCode”
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
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.
- Text inset for UITextField?
- How to load photos from photo gallery and store it into application project?
- Firebase or Swift not detecting umlauts
- Add lefthand margin to UITextField
- Xcode 4 menu “Build” and “Clean” options disabled
- View-Based NSTableView in Swift – How to
- Programmatically focus on next input field in mobile safari
- Cocos2D/iOS7: continuously increasing memory usage for boilerplate code
- iOS – updating the media play/pause state in the multitasking bar
- Receiving Push Notifications while in background
- In Swift, how do you execute one query to Parse before another on PFQueryTableViewController?
- App launches in full screen in simulator, but not on device
- UITextField clearButtonMode color
- How can I change text font in UIPickerView in iOS 7?
- How to change the uitextview font size