SFML community forums

Help => System => Topic started by: crystalmoon on March 29, 2024, 05:58:57 pm

Title: error when trying to build (gcc + codeblocks)
Post by: crystalmoon 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.
Title: Re: error when trying to build (gcc + codeblocks)
Post by: crystalmoon 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.
Title: Re: error when trying to build (gcc + codeblocks)
Post by: eXpl0it3r 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 (https://github.com/brechtsanders/winlibs_mingw/releases/download/13.1.0-16.0.5-11.0.0-msvcrt-r5/winlibs-i686-posix-dwarf-gcc-13.1.0-mingw-w64msvcrt-11.0.0-r5.7z) / x64 (https://github.com/brechtsanders/winlibs_mingw/releases/download/13.1.0-16.0.5-11.0.0-msvcrt-r5/winlibs-x86_64-posix-seh-gcc-13.1.0-mingw-w64msvcrt-11.0.0-r5.7z)) 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
Title: Re: error when trying to build (gcc + codeblocks)
Post by: crystalmoon 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
Title: Re: error when trying to build (gcc + codeblocks)
Post by: eXpl0it3r 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. ;)