Hi, I am having a similar error but on MSVC toolchain:
error: linking with `link.exe` failed: exit code: 1120
= note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\<me>\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib"
...
= note: libsfml-ef036890d6e5e265.rlib(sfml-ef036890d6e5e265.sfml.29hhr9o3-cgu.11.rcgu.o) : error LNK2019: unresolved external symbol sfRenderTexture_createWithSettings referenced in function _ZN4sfml8graphics14render_texture13RenderTexture13with_settings17hb4dc85121be46492E
C:\dev\<my-project>\target\debug\deps\<my-project>.exe : fatal error LNK1120: 1 unresolved externals
error: aborting due to previous error
Might this error actually be specific to
sfRenderTexture_createWithSettings (e.g. it's missing in the SFML library because I am using a wrong SFML version, or what ever) or rather a general linking error caused by my/our setup(s)?
Setup:
- Windows 10
- Rust 1.52.1
- rust-sfml 0.16.0
- SFML 2.5.1 - Visual C++ 15 (2017) - 64-bit
- CSFML 2.5 - Visual C++ / GCC - 64-bit
I followed the guide at
https://github.com/jeremyletang/rust-sfml/wiki/Windows to install SFML, but didn't know how to deal with the different types of SFML .lib files (e.g. those with -s, -d suffixes) so I only copied the variants without any suffix (actually also tried other variants, resulting in the same error).
Also I obviously am using Visual Studio 2019 build tools while the SFML library I downloaded is for VS2017 (due to non-existent variant for VS2019).
Just to do some more trial-n-error-ing I downloaded the SFML for 32-bit (although, apparently I am trying to build for 64-bit architecture) and this caused many more error lines:
...
libsfml-ef036890d6e5e265.rlib(sfml-ef036890d6e5e265.sfml.29hhr9o3-cgu.15.rcgu.o) : error LNK2019: unresolved external symbol sfRectangleShape_getSize referenced in function _ZN4sfml8graphics15rectangle_shape14RectangleShape4size17hc79499150836d7bcE
... [dozens of these lines, all for different "symbols" from SFML]
That makes me confident that my initial setup was a little bit
more correct as it only gave this one missing symbol "sfRenderTexture_createWithSettings".
I Hope this helps anyone and maybe also someone can help me