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

Author Topic: error when trying to build (gcc + codeblocks)  (Read 3330 times)

0 Members and 1 Guest are viewing this topic.

crystalmoon

  • Newbie
  • *
  • Posts: 3
    • View Profile
error when trying to build (gcc + codeblocks)
« on: March 29, 2024, 05:58:57 pm »
I [think I] have everything set up correctly, yet on build I get this error:

||=== Build: Release in poke_engine (compiler: GNU GCC Compiler) ===|
C:\compilers\mingw64\bin\..\lib\gcc\x86_64-w64-mingw32\13.2.0\..\..\..\..\x86_64-w64-mingw32\bin\ld.exe: ..\..\libs\SFML-2.6.1\lib\libsfml-system-s.a(Err.cpp.obj):Err.cpp:(.rdata+0x80)||undefined reference to `std::basic_streambuf<char, std::char_traits<char> >::seekpos(std::fpos<int>, std::_Ios_Openmode)&#39;|
||error: ld returned 1 exit status|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
 
please help me... I don't know what causes this.

crystalmoon

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: error when trying to build (gcc + codeblocks)
« Reply #1 on: March 29, 2024, 06:10:45 pm »
Code: [Select]
sfml-audio-s
sfml-graphics-s
sfml-window-s
sfml-system-s
opengl32
freetype
gdi32
winmm
openal32
FLAC
vorbisenc
vorbisfile
vorbis
ogg
list of the libs I linked, in order. SFML_STATIC is also defined.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: error when trying to build (gcc + codeblocks)
« Reply #2 on: April 06, 2024, 04:23:56 pm »
If you use the pre-built SFML libraries, you missed the big read box on the download page saying:

Quote
Unless you are using a newer version of Visual Studio, the compiler versions have to match 100%!

Given the download is made for MinGW WinLibs Edition (x86 / x64) 13.1.0 and your error mentions 13.2.0

If you want to avoid all of that, you can use the SFML CMake template: https://github.com/SFML/cmake-sfml-project
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

crystalmoon

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: error when trying to build (gcc + codeblocks)
« Reply #3 on: April 06, 2024, 04:29:52 pm »
I'm not using visual studio though
and I didn't *miss* it, I just thought it was specific to visual studio

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: error when trying to build (gcc + codeblocks)
« Reply #4 on: April 06, 2024, 04:47:13 pm »
It says "unless", which means, if you're not using the latest version of VS, which you aren't so it also applies to you. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything