jeremyletang / rust-sfml

SFML bindings for Rust
Other
638 stars 88 forks source link

Linking to sfml failed #262

Closed dogunbound closed 2 years ago

dogunbound commented 2 years ago
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.0.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.1.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.10.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.11.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.12.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.13.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.14.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.15.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.2.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.3.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.4.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.5.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.6.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.7.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.8.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.QuestHearth.3b40d633-cgu.9.rcgu.o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9.1k1pt34ekmaoqhfq.rcgu.o" "-Wl,--as-needed" "-L" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps" "-L" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/libsfml-db30fd527c977693.rlib" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/libbitflags-1693f043aa7c36ab.rlib" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/libonce_cell-08c040c8ce3c280a.rlib" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/libwidestring-565f67faee9caa9a.rlib" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/libcsfml_graphics_sys-606ac0000a65ca76.rlib" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/libcsfml_window_sys-3f19b37db9b7d31d.rlib" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/libcsfml_audio_sys-0911342e29dd0f56.rlib" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/libcsfml_system_sys-7c24e2f1f695cf57.rlib" "-Wl,--start-group" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-a46a068050a12a4b.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-1df56095db9453cb.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-9062de483386e50b.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-b988ab269ff13602.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-1bc822d886d4f7bd.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-963eca8df4c224a6.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-d805b480c9102e58.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-06dfdbc22b935051.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-d7523a4d118e6572.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-5d7898c7fac3a07d.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-8c2bdbab4845bf3d.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-d578639df0547b30.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-58bbb7b1efa3a5e2.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-4c9b082d197c16f8.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-70f9ed6d8e7a5ce6.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-8c0a241d0360fa53.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-bad7ed93fdd31371.rlib" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-98b4d121af2b7335.rlib" "-Wl,--end-group" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-1d9f7e5920635d15.rlib" "-Wl,-Bdynamic" "-lcsfml-graphics" "-lcsfml-window" "-lcsfml-audio" "-lcsfml-system" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/dogunbound/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/dogunbound/QuestHearth/QuestHearth/target/debug/deps/QuestHearth-1838950d70f7caf9" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs"
  = note: /usr/bin/ld: cannot find -lcsfml-graphics: No such file or directory
          /usr/bin/ld: cannot find -lcsfml-window: No such file or directory
          /usr/bin/ld: cannot find -lcsfml-audio: No such file or directory
          /usr/bin/ld: cannot find -lcsfml-system: No such file or directory
          collect2: error: ld returned 1 exit status

I have sfml installed:

./usr/share/licenses/sfml
./usr/share/SFML/examples/shader/resources/sfml.png
./usr/lib/pkgconfig/sfml-all.pc
./usr/lib/pkgconfig/sfml-audio.pc
./usr/lib/pkgconfig/sfml-graphics.pc
./usr/lib/pkgconfig/sfml-network.pc
./usr/lib/pkgconfig/sfml-system.pc
./usr/lib/pkgconfig/sfml-window.pc
./usr/lib/libsfml-audio.so
./usr/lib/libsfml-audio.so.2.5
./usr/lib/libsfml-audio.so.2.5.1
./usr/lib/libsfml-graphics.so
./usr/lib/libsfml-graphics.so.2.5
./usr/lib/libsfml-graphics.so.2.5.1
./usr/lib/libsfml-network.so
./usr/lib/libsfml-network.so.2.5
./usr/lib/libsfml-network.so.2.5.1
./usr/lib/libsfml-system.so
./usr/lib/libsfml-system.so.2.5
./usr/lib/libsfml-system.so.2.5.1
./usr/lib/libsfml-window.so
./usr/lib/libsfml-window.so.2.5
./usr/lib/libsfml-window.so.2.5.1

Unsure why it isn't linking properly.

Endeavor OS

Lastly, c++ SFML works fine. Just not rust.

dogunbound commented 2 years ago

I'm an idiot. The dependancy is csfml. Not sfml. There is a difference.