-
Notifications
You must be signed in to change notification settings - Fork 92
Windows
The gist of setting up SFML on windows is to download the SFML version matching your toolchain from https://www.sfml-dev.org/download/sfml/2.5.1/, then extract it to a place of your liking, say, C:/Users/Me/Downloads/SFML
.
NB: Remember to check sfml version needed for rust-sfml. rust-sfml 0.21.0 needs 2.6, rust-sfml 0.20.0 and below can use 2.5
Then you can set the following environment variables:
-
SFML_INCLUDE_DIR
toC:/Users/Me/Downloads/SFML/include
. -
SFML_LIBS_DIR
toC:/Users/Me/Downloads/SFML/lib
.
Close cmd prompt and reopen for environment variables to take effect.
This should let rust-sfml build correctly.
When you want to run your rust-sfml project, you should copy the .dlls inside C:/Users/Me/Downloads/SFML/bin
to your projects target/debug
or /target/release
folder. Or possibly the working directory. I'm not sure if that's necessary.
=== EVERYTHING BELOW HERE IS SEVERELY OUTDATED ===
NB: If you use GNU toolchains, try following similar steps listed in MSVC toolchain, and if that works please edit this wiki or let us know in https://github.com/jeremyletang/rust-sfml/issues/320
- Download the CSFML and SFML zip files from the links at https://github.com/jeremyletang/rust-sfml#prerequisites
- From within the extracted archives:
- Copy the
*.a
files fromCSFML\lib\gcc
andSFML\lib
toC:\Program Files\Rust stable 1.3\bin\rustlib\x86_64-pc-windows-gnu\lib
- Copy the
- Build your project e.g. using
cargo build --release
- Copy the
DLL
files fromCSFML\bin
totarget\release
- Copy the