-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better documentation and support for finding native libs on windows #138
Comments
Mentioning #165 for reference. |
I just got a rust-sfml window running on Windows with MSVC. It was painful because the documentation for building sfml/csfml with CMake is pretty much nonexistent to begin with. Apparently, CSFML needs to be built as dynamic libraries, but use SFML as static libraries. So this is what I did, ending up with the following:
I had to rename the sfml-XXX-s.lib to remove the "-s" suffix from the name, because this crate wants the clean name. I don't know if this suffix is something peculiar to the CMake build of SFML or what. But, thinking about it more... if CSFML are DLLs containing a statically linked SFML, and the rust-sfml crate only interfaces with CSFML, then rust-sfml should not need to link with SFML at all, since it does not use it. Is this correct? |
This might be true on windows, you could test it if you have the time. In the long term, I'm planning to skip CSFML entirely, and use bindgen to bind directly to SFML, but I don't know yet what will come of that. |
Hi. I have problem. SFML 2.4.0 E:\Users\Admin\projects\rust-sfml> cargo build --verbose ... error: linking with ... error: Could not compile CSFML_HOME and SFML_HOME is fine. other msvc c++ projects with sfml work fine with 32bit. ... SFML 2.4.0 It work, but how i can create static 32 bit project? |
So it should be possible to skip the reference to sfml libraries in windows only? Can that be checked in the various build.rs ffi files that emit both libraries (or the sfml-build lib.rs file itself)? (I don't know about that stuff, learning as I go) |
Yes, this should be possible using build scripts. One could check the value of |
I just wanted to document some differences I found between what I had to do and what was in the wiki. For reference, I'm on 64-bit Windows 10, with
|
For anyone coming across this issue, there's a wiki entry which worked perfectly for me: https://github.com/jeremyletang/rust-sfml/wiki/Windows And I was too blind to find it at first, so I'm putting this here in case someone else stumbles across this again. |
Additional things that can be done
The text was updated successfully, but these errors were encountered: