bastienleonard / pysfml-cython

A Python 2/3 binding for SFML 2, written with Cython
http://pysfml2-cython.readthedocs.org/
Other
68 stars 8 forks source link

Compiling error: Back not a member of sf::Keyboard (Recent SFML 2 change) #38

Closed nagn closed 12 years ago

nagn commented 12 years ago

While compiling pysfml, I get these errors:

src/sfml.cpp: In function ‘void initsfml()’: src/sfml.cpp:55699:30: error: ‘Back’ is not a member of ‘sf::Keyboard’ src/sfml.cpp: At global scope: src/sfml.cpp:33682:39: warning: ‘__pyx_obj_4sfml_Vertex* __pyx_f_4sfml_wrap_vertex_instance(sf::Vertex*)’ defined but not used [-Wunused-function] error: command 'gcc' failed with exit status 1

before the build fails. This is strange, as the documentation in SFML 2.0, sf::Keyboard does includes 'Back', but a test in regular c++ for sf::Keyboard::Back also results in an error for 'Back' not being a member of sf::Keyboard

I am running Ubuntu 32bit

Edit: see comment below

nagn commented 12 years ago

Ah. I see now.

  1. The documentation is outdated, but only because this was a very recent change
  2. 10 hours ago they renamed "Back" to Backspace https://github.com/LaurentGomila/SFML/commit/dd51b3d8ff466159e750b02dafa6f7ad7cb1d4af

since I recently compiled the latest snapshot, I got conflicts with the sfml2 library...

bastienleonard commented 12 years ago

It should now work if built from Git, see commit d228642128c771c05c782d097813981fef91b3aa. The source release from yesterday won't work (it's on purpose, I expect that a lot of people are using the binding with SFML 2 RC). If you're using the source release, you can make it work by compiling SFML without the back space change. Otherwise, I can make a new source release if you want.

nagn commented 12 years ago

Thanks