Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML is not compiling for me in Windows 11  (Read 878 times)

0 Members and 1 Guest are viewing this topic.

blizz

  • Newbie
  • *
  • Posts: 2
    • View Profile
SFML is not compiling for me in Windows 11
« on: January 07, 2023, 05:27:22 am »
I'm using Code::Blocks mingw for it, i have been added the linker settings and search directory for both (include and linker) but it sends me this error:


||=== Build: Debug in SFML W (compiler: GNU GCC Compiler) ===|
ld.exe||cannot find -lsfml-graphics-d|
ld.exe||cannot find -lsfml-window-d|
ld.exe||cannot find -lsfml-system-d|
||error: ld returned 1 exit status|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|


What can i do for fix it?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10815
    • View Profile
    • development blog
    • Email
Re: SFML is not compiling for me in Windows 11
« Reply #1 on: January 07, 2023, 04:21:00 pm »
If it can't find the specified files, then they either don't exist or the path to them isn't properly specified.
Make sure it's configured under the correct project setting (e.g. debug vs release).

If in doubt, post the verbose build output: https://www.sfml-dev.org/faq.php#tr-grl-verbose-ide
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

blizz

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: SFML is not compiling for me in Windows 11
« Reply #2 on: January 08, 2023, 10:01:01 pm »
If it can't find the specified files, then they either don't exist or the path to them isn't properly specified.
Make sure it's configured under the correct project setting (e.g. debug vs release).

If in doubt, post the verbose build output: https://www.sfml-dev.org/faq.php#tr-grl-verbose-ide

I'm trying with MSYS to compile too, but i have this error (it happends me before in other attempts)

also i check the path and everything is fine, check another options too, but it's stay happend again (I mean in code::blocks)
« Last Edit: January 08, 2023, 10:04:51 pm by blizz »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10815
    • View Profile
    • development blog
    • Email
Re: SFML is not compiling for me in Windows 11
« Reply #3 on: January 08, 2023, 11:50:45 pm »
I recommend to try and solve one thing, one step at a time. If you just all sorts of random things, you'll just confuse yourself and make it harder for anyone to help you.

The Code::Blocks tutorial is pretty clear on how to setup Code::Blocks. Try to follow it precisely and also read the text, don't just look at the pictures: https://www.sfml-dev.org/tutorials/2.5/start-cb.php
If it doesn't work, provide the verbose build output: https://www.sfml-dev.org/faq.php#tr-grl-verbose-ide

You can use MSYS2 binaries, but you can't build SFML inside MSYS2 as it emulates a Linux environment, while actually still running on Windows. SFML's CMake configuration, hasn't been adapted for this.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/