Hello
Today I wanted to use SFML in static on my mac, only it seems that I crash immediately at the launch of the program. So I decided to reproduce the error with an all-fresh build of the sfml.
Here is the procedure:
git clone https://github.com/SFML/SFML
mkdir build && cd build
cmake -DBUILD_SHARED_LIBS:BOOL=OFF -DSFML_BUILD_EXAMPLES:BOOL=ON ..
make -j
cd examples/window
./window
There is the fullstacktrace:
2018-06-18 14:46:19.399 window[11527:6544367] -[SFOpenGLView enableKeyRepeat]: unrecognized selector sent to instance 0x7fe0b762c5c0
2018-06-18 14:46:19.399 window[11527:6544367] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SFOpenGLView enableKeyRepeat]: unrecognized selector sent to instance 0x7fe0b762c5c0'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff41f37fcb __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fff68bd5c76 objc_exception_throw + 48
2 CoreFoundation 0x00007fff41fd0a24 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00007fff41eae610 ___forwarding___ + 1456
4 CoreFoundation 0x00007fff41eadfd8 _CF_forwarding_prep_0 + 120
5 window 0x000000010af7f34a -[SFOpenGLView initWithFrame:fullscreen:] + 122
6 window 0x000000010af808c5 -[SFWindowController setupWindowWithMode:andStyle:] + 437
7 window 0x000000010af801e4 -[SFWindowController initWithMode:andStyle:] + 356
8 window 0x000000010af82a96 _ZN2sf4priv15WindowImplCocoaC2ENS_9VideoModeERKNS_6StringEmRKNS_15ContextSettingsE + 230
9 window 0x000000010af761f3 _ZN2sf4priv10WindowImpl6createENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE + 67
10 window 0x000000010af75215 _ZN2sf6Window6createENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE + 469
11 window 0x000000010af752d7 _ZN2sf6WindowC1ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE + 119
12 window 0x000000010af6f74d main + 173
13 window 0x000000010af6f694 start + 52
)
libc++abi.dylib: terminating with uncaught exception of type NSException
[1] 11527 abort ./window
Computer:
macOs High Sierra 10.13.3
Compiler:
./clang++ -v
clang version 6.0.0 (tags/RELEASE_600/final)
Target: x86_64-apple-darwin17.4.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
There seems to be an error in the objective-c code, I do not know if it's a regression since 2.5.0 I've never used SFML in static on this platform before
Thanks you for your help !