jeremyletang / rust-sfml

SFML bindings for Rust
Other
639 stars 88 forks source link

[macOS] 0.20.0 sfml package build failure #304

Closed milijan closed 1 year ago

milijan commented 1 year ago

Steps to reproduce:

cargo new hello_world --bin
cd hello_world
cargo add sfml
cargo build

expected result (obtained on codespace linux):

Compiling sfml v0.20.0
Compiling widestring v1.0.2
Compiling bitflags v1.3.2
Compiling hello_world v0.1.0 (/home/codespace/rust/hello_world)
Finished dev [unoptimized + debuginfo] target(s) in 16.35s

Actual result (obtained on macOS):

warning: CSFML/src/Window/Touch.cpp:13:84: error: no type named 'Window' in namespace 'sf'
warning: extern "C" sfVector2i sfTouch_getPositionRelativeTo(unsigned int finger, const sf::Window *relativeTo) {
warning:                                                                                ~~~~^
warning: 1 error generated.

Proposed Fix: Adding #include <SFML/Window/Window.hpp> to CSFML/src/Window/Touch.cpp internal CSFML source.

crumblingstatue commented 1 year ago

Thank you for the report, I commited a fix. Let me know if it worked.

milijan commented 1 year ago

Looks good.