I would like to use the SDL_SysWMinfo struct in my program (defined in SDL2/SDL_syswm.h) but when I compile it with clang on OS X I am greeted with the following error:
error: call to implicitly-deleted default constructor of 'SDL_SysWMinfo'
SDL_SysWMinfo wm_info;
^
/usr/local/include/SDL2/SDL_syswm.h:235:7: note: default constructor of 'SDL_SysWMinfo' is implicitly deleted because field 'info' has a deleted default constructor
} info;
^
/usr/local/include/SDL2/SDL_syswm.h:209:11: note: default constructor of '' is implicitly deleted because variant field 'cocoa' has a non-trivial default constructor
} cocoa;
^
1 error generated.
Am I using the struct wrong? Is this possibly a SDL2 bug?
clang version:
$ clang++ --version
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
SDL2 version (from homebrew):
$ brew info sdl2
sdl2: stable 2.0.3 (bottled), HEAD
Edit: There seems to have been a similar question on StackOverflow at some point (see http://ift.tt/1hvd5yO). It seems that it got deleted, but I can't find out why or whether it had been solved.
Aucun commentaire:
Enregistrer un commentaire