In Xcode 4.3.3, on OSX 10.7.5, I am creating a new SFML app, with C++11 and Clang.
If I run it as is, I get linker errors:
Undefined symbols for architecture x86_64:
"_objc_msgSend", referenced from:
resourcePath() in ResourcePath.o
"_NSLog", referenced from:
resourcePath() in ResourcePath.o
"_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
objc-class-ref in ResourcePath.o
"_objc_msgSend_fixup", referenced from:
l_objc_msgSend_fixup_alloc in ResourcePath.o
"_OBJC_CLASS_$_NSBundle", referenced from:
objc-class-ref in ResourcePath.o
"___CFConstantStringClassReference", referenced from:
CFString in ResourcePath.o
ld: symbol(s) not found for architecture x86_64
So I add the Foundation.framework to the build, and it builds with no errors.
However it crashes on start with a dyld_fatal_error.
The console log is:
dyld: Symbol not found: _OBJC_CLASS_$_NSObject
Referenced from: /Users/... .../Frameworks/sfml-window.framework/Versions/2.1.0/sfml-window
Expected in: /usr/lib/libobjc.A.dylib
in /Users/... .../Frameworks/sfml-window.framework/Versions/2.1.0/sfml-window
This is with SFML 2.1
I've tried fixing the working directoy in the scheme, ensured build target is 10.7, commented out all of main, tried adding CoreFoundation...