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

Author Topic: SFML Audio not statically linking - Observation  (Read 2617 times)

0 Members and 1 Guest are viewing this topic.

The Joyful Programmer

  • Newbie
  • *
  • Posts: 3
    • View Profile
SFML Audio not statically linking - Observation
« on: July 04, 2024, 08:44:22 pm »
This is an observation, not a request for help.

CURRENT SETUP:
  • Windows 11 - 64-Bit
  • Compilers (i.e. GCC v14.1.0) and Libraries (i.e. SFML v2.6.1) are installed through MSYS2 (currently up to date)
  • Using the CODE::BLOCKS IDE v20.03 (because I help beginners)
CURRENT COMPILER SETTINGS:
These settings are set in the "Project build options", not the "Global compiler settings" in Code::Blocks.
  • [-m64]        Target x86_64
  • [-Wall]       Enable all common compiler warnings
  • [-O2]         Optimize for speed
  • [-s]          Strip all symbols from binary
  • [-std=c++23]  Follow the C++ language standard 23
#DEFINES:
  • SFML_STATIC
LINKER SETTINGS:
  • sfml-system-s
  • sfml-audio.dll (Could not get the SFML-AUDIO-S library to work)
  • winmm
SEARCH DIRECTORIES:
  • COMPILER:  C:\msys64\ucrt64\include
  • Linker:  C:\msys64\ucrt64\lib
This all works great on my computer, but when I move it to another Windows 11 machine, it requires the following DLL files to be in the same directory/folder as the executable:
  • libFLAC.dll
  • libgcc_s_seh-1.dll
  • libogg-0.dll
  • libopenal-1.dll
  • libsfml-audio-2.dll
  • libsfml-system-2.dll
  • libstdc++-6.dll
  • libvorbis-0.dll
  • libvorbisenc-2.dll
  • libvorbisfile-3.dll
  • libwinpthread-1.dll
All these DLL files can be found in the C:\msys64\ucrt64\bin directory (if that is where MSYS2 was installed).

I have tried using [-static], [-static-libstdc++], and [-static] + [-static-libstdc++], but all the DLLs above are still required. As such, I removed [-static] and [-static-libstdc++] to keep the executable file size down to a bare minimum.

In the following source code, I used a modified version of the "PlayMusic()" function provided in the SFML "sound" example.

#include <SFML/System.hpp>
#include <SFML/Audio.hpp>
#include <string>
#include <iostream>


void
playMusic(const std::string& filename)
{
    const float FrameSpeed = 1.0f / 60.0f;

    sf::Music music;
    if (!music.openFromFile(filename)) return;

    std::cout << filename << ":\n"
              << " " << music.getDuration().asSeconds() << " seconds\n"
              << " " << music.getSampleRate()           << " samples / sec\n"
              << " " << music.getChannelCount()         << " channels\n";

    music.play();

    while (music.getStatus() == sf::Music::Playing)
    {
        sf::sleep(sf::seconds(FrameSpeed));

        std::cout << "\rPlaying... "
                  << music.getPlayingOffset().asSeconds()
                  << " sec        "
                  << std::flush;
    }

    std::cout << "\n\n";
}


int
main() {

    playMusic("music/Moonlight Hall.mp3");

}

 

No MINGW or VISUAL STUDIO was used or harmed in the making of the test demo or this post.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
Re: SFML Audio not statically linking - Observation
« Reply #1 on: July 04, 2024, 11:54:13 pm »
You can't mix and match static and dynamic linking of SFML, it's either static or dynamic (or I guess xor ;) ).

(Could not get the SFML-AUDIO-S library to work)
What didn't work?

I don't know who creates/maintains the MSYS2 package for SFML, as such I also don't know how they have built it. Usually, we're linking the audio dependencies statically, but in this case it seems they've patched SFML's build system to link the dependencies dynamically, thus requiring you to provide flac, vorbis, etc. as DLLs.

Personally I tend to use something like the SFML CMake Template that also builds SFML for me, so I don't have to worry about compile compatibility or wonder how the binaries were built.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

The Joyful Programmer

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML Audio not statically linking - Observation
« Reply #2 on: July 05, 2024, 02:36:33 am »
Quote
You can't mix and match static and dynamic linking of SFML, it's either static or dynamic

Honestly, I never tried mixing static and dynamic linking of SFML, except in this case, when I exhausted tons of other ideas.

This is the first time using SFML from MSYS2 and this is the reason I went ahead and created an account here and posted my observations. Over the years, I normally would compile SFML with my favorite compiler so I could avoid such problems. However, since I have used many libraries and apps from MSYS2 without issues, I never thought I would have any with SFML since I assume it was compiled with the latest GCC compiler toolchain they provide as well.

(side note) I recognized the errors I was getting and knew it was a linker issue.

Quote
What didn't work?

In Code::Blocks, under PROJECT > PROJECT BUILD OPTIONS > RELEASE > LINKER SETTINGS > LINK LIBRARIES, if I use sfml-audio-s, I get the following errors:

Code: [Select]
Build started on: 04-07-2024 at 19:11.50
Build ended on: 04-07-2024 at 19:11.56

-------------- Build: Release in SFML-Audio-Test-v1 (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -O2 -Wall -m64 -std=c++23 -DSFML_STATIC -IC:\msys64\ucrt64\lib -IC:\msys64\ucrt64\include -c "D:\tjp\0010a - C++ and C\WALTERSMIND - SFML\SFML-2.6.1-Examples\SFML-Audio-Test-v1\SFML-Audio-Test-v1.cpp" -o obj\Release\SFML-Audio-Test-v1.o

g++.exe -LC:\msys64\ucrt64\include -LC:\msys64\ucrt64\lib -o bin\Release\SFML-Audio-Test-v1.exe obj\Release\SFML-Audio-Test-v1.o -s -m64 -lsfml-system-s -lsfml-audio-s -lwinmm

C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0x2a): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0xa7): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0x10e): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0x13d): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0x151): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0x165): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0x19f): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0x1ef): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0x238): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0x26f): undefined reference to "sf::Mutex::~Mutex()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0x2cf): undefined reference to "sf::Mutex::~Mutex()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0x363): undefined reference to "sf::Mutex::Mutex()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0x55a): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0x729): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(Music.cpp.obj):(.text+0x749): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(InputSoundFile.cpp.obj):(.text+0xe8): undefined reference to "sf::FileInputStream::FileInputStream()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(InputSoundFile.cpp.obj):(.text+0xfb): undefined reference to "sf::FileInputStream::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(InputSoundFile.cpp.obj):(.text+0x22f): undefined reference to "sf::MemoryInputStream::MemoryInputStream()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(InputSoundFile.cpp.obj):(.text+0x245): undefined reference to "sf::MemoryInputStream::open(void const*, unsigned long long)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(InputSoundFile.cpp.obj):(.text+0x3a1): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x36): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x42): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x4b): undefined reference to "sf::Thread::wait()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x86): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x9b): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xab): undefined reference to "__imp_alSourcePause'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xb4): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xe8): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xf8): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x13a): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x14a): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x152): undefined reference to "sf::Thread::wait()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x191): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x227): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x237): undefined reference to "__imp_alSourcePlay'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x23f): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x29a): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x308): undefined reference to "sf::Mutex::Mutex()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x373): undefined reference to "sf::Mutex::~Mutex()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x37f): undefined reference to "sf::Thread::~Thread()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x3b4): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x3c4): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x3cc): undefined reference to "sf::Thread::wait()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x3d4): undefined reference to "sf::Mutex::~Mutex()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x3dc): undefined reference to "sf::Thread::~Thread()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x414): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x424): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x42c): undefined reference to "sf::Thread::wait()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x434): undefined reference to "sf::Mutex::~Mutex()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x43c): undefined reference to "sf::Thread::~Thread()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x4a1): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x5b7): undefined reference to "__imp_alGetSourcef'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x7d7): undefined reference to "__imp_alBufferData'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x7ea): undefined reference to "__imp_alSourceQueueBuffers'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x8fa): undefined reference to "__imp_alGetSourcei'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x909): undefined reference to "__imp_alSourceUnqueueBuffers'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x96d): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x97e): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x9b6): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x9d0): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x9de): undefined reference to "__imp_alGenBuffers'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xa20): undefined reference to "__imp_alSourcePlay'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xa35): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xa4a): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xa6f): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xa88): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xac4): undefined reference to "__imp_alGetSourcei'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xae8): undefined reference to "__imp_alSourceUnqueueBuffers'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xc28): undefined reference to "__imp_alBufferData'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xc3c): undefined reference to "__imp_alSourceQueueBuffers'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xc8c): undefined reference to "__imp_alGetBufferi'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xca0): undefined reference to "__imp_alGetBufferi'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xd02): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xd0f): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xd4a): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xdb8): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xdc5): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xdf1): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xdfb): undefined reference to "__imp_alSourceStop'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xe0f): undefined reference to "__imp_alGetSourcei'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xe1a): undefined reference to "__imp_alSourceUnqueueBuffers'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xe53): undefined reference to "__imp_alSourcei'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xe75): undefined reference to "__imp_alDeleteBuffers'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xeb0): undefined reference to "__imp_alSourcePause'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xec1): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xee6): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xf59): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xf65): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xf6e): undefined reference to "sf::Thread::wait()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xfd9): undefined reference to "sf::Thread::launch()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x1015): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x1026): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x182): undefined reference to "sf::Thread::launch()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileFactory.cpp.obj):(.text+0x703): undefined reference to "sf::MemoryInputStream::MemoryInputStream()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileFactory.cpp.obj):(.text+0x711): undefined reference to "sf::MemoryInputStream::open(void const*, unsigned long long)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileFactory.cpp.obj):(.text+0x743): undefined reference to "sf::MemoryInputStream::seek(long long)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileFactory.cpp.obj):(.text+0x761): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileFactory.cpp.obj):(.text+0x861): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileFactory.cpp.obj):(.text+0x959): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileFactory.cpp.obj):(.text+0xa40): undefined reference to "sf::FileInputStream::FileInputStream()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileFactory.cpp.obj):(.text+0xa4b): undefined reference to "sf::FileInputStream::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileFactory.cpp.obj):(.text+0xa83): undefined reference to "sf::FileInputStream::seek(long long)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileFactory.cpp.obj):(.text+0xa9a): undefined reference to "sf::FileInputStream::~FileInputStream()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileFactory.cpp.obj):(.text+0xab1): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileFactory.cpp.obj):(.text+0xb71): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileFactory.cpp.obj):(.text+0xbdd): undefined reference to "sf::FileInputStream::~FileInputStream()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x18d): undefined reference to "FLAC__stream_decoder_seek_absolute'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x196): undefined reference to "FLAC__stream_decoder_skip_single_frame'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x1cc): undefined reference to "FLAC__stream_decoder_finish'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x1d5): undefined reference to "FLAC__stream_decoder_delete'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x22c): undefined reference to "FLAC__stream_decoder_finish'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x235): undefined reference to "FLAC__stream_decoder_delete'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x2f5): undefined reference to "FLAC__stream_decoder_process_single'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x302): undefined reference to "FLAC__stream_decoder_get_state'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x421): undefined reference to "FLAC__stream_decoder_new'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x494): undefined reference to "FLAC__stream_decoder_init_stream'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x49d): undefined reference to "FLAC__stream_decoder_process_until_end_of_metadata'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x4c9): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x562): undefined reference to "FLAC__stream_decoder_finish'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x56b): undefined reference to "FLAC__stream_decoder_delete'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x578): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x5ad): undefined reference to "FLAC__stream_decoder_new'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x63b): undefined reference to "FLAC__stream_decoder_init_stream'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x643): undefined reference to "FLAC__stream_decoder_process_until_end_of_metadata'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x64d): undefined reference to "FLAC__stream_decoder_finish'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x655): undefined reference to "FLAC__stream_decoder_delete'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x722): undefined reference to "FLAC__stream_decoder_finish'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x72b): undefined reference to "FLAC__stream_decoder_delete'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x17a): undefined reference to "FLAC__stream_decoder_seek_absolute'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x11b): undefined reference to "ov_read'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x15e): undefined reference to "ov_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x1c3): undefined reference to "ov_open_callbacks'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x1d4): undefined reference to "ov_info'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x1ec): undefined reference to "ov_pcm_total'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x219): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x2ba): undefined reference to "ov_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x30b): undefined reference to "ov_test_callbacks'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x324): undefined reference to "ov_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x384): undefined reference to "ov_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0xb7): undefined reference to "ov_pcm_seek'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderWav.cpp.obj):(.text+0x592): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderWav.cpp.obj):(.text+0x5d5): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderWav.cpp.obj):(.text+0x623): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderWav.cpp.obj):(.text+0x6d1): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x192): undefined reference to "FLAC__stream_encoder_process_interleaved'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x54c): undefined reference to "FLAC__stream_encoder_finish'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x555): undefined reference to "FLAC__stream_encoder_delete'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x5ac): undefined reference to "FLAC__stream_encoder_finish'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x5b5): undefined reference to "FLAC__stream_encoder_delete'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x605): undefined reference to "FLAC__stream_encoder_new'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x618): undefined reference to "FLAC__stream_encoder_set_channels'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x626): undefined reference to "FLAC__stream_encoder_set_bits_per_sample'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x631): undefined reference to "FLAC__stream_encoder_set_sample_rate'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x643): undefined reference to "FLAC__stream_encoder_init_file'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x661): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x6e9): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x76c): undefined reference to "FLAC__stream_encoder_finish'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x775): undefined reference to "FLAC__stream_encoder_delete'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x9c2): undefined reference to "FLAC__stream_encoder_finish'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x9cb): undefined reference to "FLAC__stream_encoder_delete'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x1ab): undefined reference to "vorbis_block_init'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x1b7): undefined reference to "vorbis_analysis_blockout'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x1cb): undefined reference to "vorbis_analysis'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x1da): undefined reference to "vorbis_bitrate_addblock'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x1e7): undefined reference to "vorbis_bitrate_flushpacket'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x1fb): undefined reference to "ogg_stream_packetin'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x207): undefined reference to "ogg_stream_flush'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x239): undefined reference to "vorbis_block_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x29f): undefined reference to "vorbis_analysis_buffer'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x314): undefined reference to "vorbis_analysis_wrote'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x3cd): undefined reference to "ogg_stream_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x3d5): undefined reference to "vorbis_dsp_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x3e1): undefined reference to "vorbis_info_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x472): undefined reference to "vorbis_analysis_wrote'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x52d): undefined reference to "ogg_stream_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x535): undefined reference to "vorbis_dsp_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x541): undefined reference to "vorbis_info_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x5e2): undefined reference to "vorbis_analysis_wrote'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x66c): undefined reference to "ogg_stream_init'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x674): undefined reference to "vorbis_info_init'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x689): undefined reference to "vorbis_encode_init_vbr'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x6ab): undefined reference to "vorbis_analysis_init'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x6f2): undefined reference to "vorbis_comment_init'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x729): undefined reference to "vorbis_analysis_headerout'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x735): undefined reference to "vorbis_comment_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x756): undefined reference to "ogg_stream_packetin'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x763): undefined reference to "ogg_stream_packetin'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x770): undefined reference to "ogg_stream_packetin'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x7b1): undefined reference to "ogg_stream_flush'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x7d9): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x868): undefined reference to "ogg_stream_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x870): undefined reference to "vorbis_dsp_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x878): undefined reference to "vorbis_info_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x889): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x923): undefined reference to "ogg_stream_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x92b): undefined reference to "vorbis_dsp_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x933): undefined reference to "vorbis_info_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x9c9): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0xa16): undefined reference to "vorbis_analysis_wrote'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0xa5a): undefined reference to "vorbis_analysis_wrote'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0xacb): undefined reference to "ogg_stream_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0xad3): undefined reference to "vorbis_dsp_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0xafa): undefined reference to "vorbis_analysis_wrote'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0xae7): undefined reference to "vorbis_info_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterWav.cpp.obj):(.text+0x681): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterWav.cpp.obj):(.text+0x751): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x8): undefined reference to "__imp_alcMakeContextCurrent'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x1a): undefined reference to "__imp_alcDestroyContext'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x2c): undefined reference to "__imp_alcCloseDevice'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x4a): undefined reference to "__imp_alcOpenDevice'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x65): undefined reference to "__imp_alcCreateContext'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x7e): undefined reference to "__imp_alcMakeContextCurrent'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0xd3): undefined reference to "__imp_alListenerf'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0xf6): undefined reference to "__imp_alListener3f'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x106): undefined reference to "__imp_alListenerfv'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x119): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x171): undefined reference to "sf::err()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x1c8): undefined reference to "__imp_alcMakeContextCurrent'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x1da): undefined reference to "__imp_alcDestroyContext'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x1ec): undefined reference to "__imp_alcCloseDevice'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x229): undefined reference to "__imp_alListenerf'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x277): undefined reference to "__imp_alListener3f'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x30e): undefined reference to "__imp_alListenerfv'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x3a1): undefined reference to "__imp_alListenerfv'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x427): undefined reference to "__imp_alIsExtensionPresent'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x430): undefined reference to "__imp_alcMakeContextCurrent'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x43a): undefined reference to "__imp_alcDestroyContext'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x441): undefined reference to "__imp_alcCloseDevice'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x4cf): undefined reference to "__imp_alcIsExtensionPresent'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x5f1): undefined reference to "__imp_alGetEnumValue'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x60a): undefined reference to "__imp_alcMakeContextCurrent'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x611): undefined reference to "__imp_alcDestroyContext'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x61b): undefined reference to "__imp_alcCloseDevice'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x699): undefined reference to "__imp_alGetEnumValue'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x6b9): undefined reference to "__imp_alGetEnumValue'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x6d9): undefined reference to "__imp_alGetEnumValue'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text$_ZNSt6vectorIN2sf4priv11AudioDeviceESaIS2_EED1Ev[_ZNSt6vectorIN2sf4priv11AudioDeviceESaIS2_EED1Ev]+0x1e): undefined reference to "__imp_alcMakeContextCurrent'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text$_ZNSt6vectorIN2sf4priv11AudioDeviceESaIS2_EED1Ev[_ZNSt6vectorIN2sf4priv11AudioDeviceESaIS2_EED1Ev]+0x25): undefined reference to "__imp_alcDestroyContext'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AudioDevice.cpp.obj):(.text$_ZNSt6vectorIN2sf4priv11AudioDeviceESaIS2_EED1Ev[_ZNSt6vectorIN2sf4priv11AudioDeviceESaIS2_EED1Ev]+0x2c): undefined reference to "__imp_alcCloseDevice'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x13): undefined reference to "__imp_alGetSourcei'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x63): undefined reference to "__imp_alGenSources'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x74): undefined reference to "__imp_alSourcei'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0xcc): undefined reference to "__imp_alGenSources'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0xd6): undefined reference to "__imp_alSourcei'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0xf5): undefined reference to "__imp_alGetSourcef'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x10c): undefined reference to "__imp_alSourcef'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x173): undefined reference to "__imp_alGetSource3f'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x199): undefined reference to "__imp_alSource3f'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x1ac): undefined reference to "__imp_alGetSourcei'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x24f): undefined reference to "__imp_alSourcei'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x25e): undefined reference to "__imp_alDeleteSources'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x28f): undefined reference to "__imp_alSourcei'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x29e): undefined reference to "__imp_alDeleteSources'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x2ce): undefined reference to "__imp_alSourcef'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x2f7): undefined reference to "__imp_alSourcef'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x31a): undefined reference to "__imp_alSource3f'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x352): undefined reference to "__imp_alSource3f'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x36f): undefined reference to "__imp_alSourcei'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x38e): undefined reference to "__imp_alSourcef'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x3ae): undefined reference to "__imp_alSourcef'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x3d3): undefined reference to "__imp_alGetSourcef'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x403): undefined reference to "__imp_alGetSourcef'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x450): undefined reference to "__imp_alGetSource3f'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x473): undefined reference to "__imp_alGetSourcei'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x4a3): undefined reference to "__imp_alGetSourcef'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x4d3): undefined reference to "__imp_alGetSourcef'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x4fd): undefined reference to "__imp_alGetSourcef'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x51d): undefined reference to "__imp_alSourcef'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x58c): undefined reference to "__imp_alGetSource3f'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x5b2): undefined reference to "__imp_alSource3f'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x5c3): undefined reference to "__imp_alGetSourcei'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x5df): undefined reference to "__imp_alSourcei'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AlResource.cpp.obj):(.text+0x27): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AlResource.cpp.obj):(.text+0x64): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AlResource.cpp.obj):(.text+0x8a): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AlResource.cpp.obj):(.text+0xb6): undefined reference to "sf::Lock::Lock(sf::Mutex&)'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AlResource.cpp.obj):(.text+0xe8): undefined reference to "sf::Lock::~Lock()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AlResource.cpp.obj):(.text+0x8): undefined reference to "sf::Mutex::~Mutex()'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(AlResource.cpp.obj):(.text.startup+0xc): undefined reference to "sf::Mutex::Mutex()'

collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 5 second(s))
280 error(s), 0 warning(s) (0 minute(s), 5 second(s))

I fought these types of errors for many hours. When I was about to just compile a copy of SFML, I decided, just for fun, to try and use the dynamic linking of that library (by replacing SFML-AUDIO-S with SFML-AUDIO.DLL). Boom! It worked. I could run the executable on my machine, outside of Code::Blocks and it worked. However, when I copied it over to another machine and ran it, I received popup error messages telling me I needed certain DLL files. The list in my previous post shows all the ones I needed to make my test demo work.

Quote
I don't know who creates/maintains the MSYS2 package for SFML

https://www.msys2.org/

If you have ever coded in a Linux Distro, then you will love MSYS2. It's like using Linux but in Windows. My favorite part of MSYS2 is unlike Ubuntu and some others, MSYS2 provides completely up-to-date libraries and apps. Ubuntu provides GCC v13.3 while MSYS2 provides GCC v14.1.0.

Quote
Usually, we're linking the audio dependencies statically, but in this case it seems they've patched SFML's build system to link the dependencies dynamically, thus requiring you to provide flac, vorbis, etc. as DLLs.

I'm not sure either, but I just discovered something on MSYS2's website (while writing this post) that might give us a clue into the possible issue:

Quote
2024-05-10 - GCC 14.1

We have updated GCC to version 14.1. See the GCC 14.1 release notes for more information. Similar to recent Clang releases, GCC also got stricter and multiple warnings are now errors by default, see the GCC 14.1 porting guide for details.

I'm grasping at straws on that, but it is something of interest that I might look into.

Quote
Personally I tend to use something like the SFML CMake Template that also builds SFML for me, so I don't have to worry about compile compatibility or wonder how the binaries were built.

As I mentioned earlier, normally I would compile SFML with my favorite compiler toolchain. However, since I work with a lot of less-experienced, and sometimes lazy individuals, Code::Blocks seems to be the right fit to help them grow (even a little) without overwhelming them. Since MSYS2 provides up-to-date libraries I commonly use on Windows and Linux, and provides quick-and-easy access to beginners by offering them all as precompiled, it is the system I choose to use with others.

Not to be spamming, but my brand, "The Joyful Programmer" is primarily about working and socializing with "Computer Programming Hobbyists, Tinkerers, Amateurs, and Enthusiasts". This is why I chose to use things like Code::Blocks and MSYS2.

I generally don't join communities of the products and tools I use. I simply don't have the time or energy to do so. However, I have been using SFML since 2016 and do get emails when people post issues and responses on SFML's GitHub repository.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
Re: SFML Audio not statically linking - Observation
« Reply #3 on: July 05, 2024, 08:34:08 am »
Code: [Select]
g++.exe -LC:\msys64\ucrt64\include -LC:\msys64\ucrt64\lib -o bin\Release\SFML-Audio-Test-v1.exe obj\Release\SFML-Audio-Test-v1.o -s -m64 -lsfml-system-s -lsfml-audio-s -lwinmm
The linking order is wrong, it should be -lsfml-audio-s -lsfml-system-s. The rule of thumb is "if X depends on Y, X needs to come before Y".
You'll also have to link FLAC, vorbis, ogg and OpenAL
See the tutorial: https://www.sfml-dev.org/tutorials/2.6/start-cb.php


Quote
I don't know who creates/maintains the MSYS2 package for SFML

If you have ever coded in a Linux Distro, then you will love MSYS2. It's like using Linux but in Windows. My favorite part of MSYS2 is unlike Ubuntu and some others, MSYS2 provides completely up-to-date libraries and apps. Ubuntu provides GCC v13.3 while MSYS2 provides GCC v14.1.0.
I know MSYS2, it can indeed be quite neat to work with.
What I meant was that the SFML package provided through MSYS2 package manager must have been built by someone and I don't know who and how it's being maintained, so I can't provide more help with their version.

Quote
We have updated GCC to version 14.1. See the GCC 14.1 release notes for more information. Similar to recent Clang releases, GCC also got stricter and multiple warnings are now errors by default, see the GCC 14.1 porting guide for details.

I'm grasping at straws on that, but it is something of interest that I might look into.
Just sounds like a generic compiler update, nothing special here.

I generally don't join communities of the products and tools I use. I simply don't have the time or energy to do so. However, I have been using SFML since 2016 and do get emails when people post issues and responses on SFML's GitHub repository.
Glad to have you here! :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

The Joyful Programmer

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML Audio not statically linking - Observation
« Reply #4 on: July 05, 2024, 03:11:07 pm »
Quote
The linking order is wrong, it should be -lsfml-audio-s -lsfml-system-s. The rule of thumb is "if X depends on Y, X needs to come before Y".
You'll also have to link FLAC, vorbis, ogg and OpenAL

Oops! I was tired when I posted that error listing. I had those removed when I used the dynamic version and forgot to replace them when I switched to the static version to demonstrate the issues I was having.

Here is the correct error listing:

Code: [Select]
Build started on: 05-07-2024 at 08:02.56
Build ended on: 05-07-2024 at 08:02.57

-------------- Build: Release in SFML-Audio-Test-v1 (compiler: GNU GCC Compiler)---------------
g++.exe -LC:\msys64\ucrt64\include -LC:\msys64\ucrt64\lib -o bin\Release\SFML-Audio-Test-v1.exe obj\Release\SFML-Audio-Test-v1.o -s -m64 -lsfml-audio-s -lsfml-system-s -lwinmm -lFLAC -lvorbis -logg -lOpenAL

C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x11b): undefined reference to "ov_read'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x15e): undefined reference to "ov_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x1c3): undefined reference to "ov_open_callbacks'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x1d4): undefined reference to "ov_info'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x1ec): undefined reference to "ov_pcm_total'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x2ba): undefined reference to "ov_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x30b): undefined reference to "ov_test_callbacks'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x324): undefined reference to "ov_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x384): undefined reference to "ov_clear'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0xb7): undefined reference to "ov_pcm_seek'
C:\msys64\ucrt64\lib/libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x689): undefined reference to "vorbis_encode_init_vbr'

collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 1 second(s))
12 error(s), 0 warning(s) (0 minute(s), 1 second(s))

Quote
See the tutorial: https://www.sfml-dev.org/tutorials/2.6/start-cb.php

That is a great article for users to read to get started. I did reference it during my experimentation to make sure I didn't forget something.

As I mentioned before, I have used SFML since 2016, so I am familiar with the linking order issues.

Quote
I know MSYS2, it can indeed be quite neat to work with.

It is. Sadly, I only discovered MSYS2 late last year. Of course, I had left Windows a few years back and only coded in Linux (Ubuntu, Mint, and some others) and on my Raspberry Pi 400 device. I had to come back to Windows when my wife finally talked me into going to college (33 years too late), as I needed the OS for school-related matters.

Quote
What I meant was that the SFML package provided through MSYS2 package manager must have been built by someone and I don't know who and how it's being maintained, so I can't provide more help with their version.

Thank you for explaining your intentional meaning. When it comes to SFML, I am not used to using someone else's prebuilt version. I have always compiled the library in my favorite compiler toolchain. As such, I am learning the ins and outs of theirs. In the future, I may separately compile SFML with the GCC version that comes with MSYS2, to see what the differences are, if any.

Quote
Just sounds like a generic compiler update, nothing special here.

That's what I first thought as well, but the part, "GCC also got stricter and multiple warnings are now errors by default" started getting me to wonder if this simple detail could be a potential issue. I won't know until I experiment with it.

Quote
Glad to have you here! :)

I like to keep up-to-date with my favorite products (SFML, GLFW, SDL, GCC, nlohmann/json, and others).
One thing I haven't mentioned is when I use the -STATIC linker option. If I use that linker option (all MSYS2 stuff here) on the audio demo, here are all the errors I get:

Code: [Select]
Build started on: 05-07-2024 at 08:52.48
Build ended on: 05-07-2024 at 08:52.50

-------------- Build: Release in SFML-Audio-Test-v1 (compiler: GNU GCC Compiler)---------------

g++.exe -LC:\msys64\ucrt64\include -LC:\msys64\ucrt64\lib -o bin\Release\SFML-Audio-Test-v1.exe obj\Release\SFML-Audio-Test-v1.o -s -static-libstdc++ -static -m64 -lOpenAL -lFLAC -lvorbisenc -lvorbisfile -lvorbis -logg -lsfml-audio-s -lsfml-system-s -lwinmm -lgdi32

C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xab): undefined reference to "__imp_alSourcePause'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x237): undefined reference to "__imp_alSourcePlay'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x5b7): undefined reference to "__imp_alGetSourcef'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x7d7): undefined reference to "__imp_alBufferData'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x7ea): undefined reference to "__imp_alSourceQueueBuffers'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x8fa): undefined reference to "__imp_alGetSourcei'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x909): undefined reference to "__imp_alSourceUnqueueBuffers'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0x9de): undefined reference to "__imp_alGenBuffers'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xa20): undefined reference to "__imp_alSourcePlay'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xac4): undefined reference to "__imp_alGetSourcei'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xae8): undefined reference to "__imp_alSourceUnqueueBuffers'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xc28): undefined reference to "__imp_alBufferData'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xc3c): undefined reference to "__imp_alSourceQueueBuffers'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xc8c): undefined reference to "__imp_alGetBufferi'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xca0): undefined reference to "__imp_alGetBufferi'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xdfb): undefined reference to "__imp_alSourceStop'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xe0f): undefined reference to "__imp_alGetSourcei'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xe1a): undefined reference to "__imp_alSourceUnqueueBuffers'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xe53): undefined reference to "__imp_alSourcei'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xe75): undefined reference to "__imp_alDeleteBuffers'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundStream.cpp.obj):(.text+0xeb0): undefined reference to "__imp_alSourcePause'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x18d): undefined reference to "FLAC__stream_decoder_seek_absolute'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x196): undefined reference to "FLAC__stream_decoder_skip_single_frame'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x1cc): undefined reference to "FLAC__stream_decoder_finish'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x1d5): undefined reference to "FLAC__stream_decoder_delete'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x22c): undefined reference to "FLAC__stream_decoder_finish'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x235): undefined reference to "FLAC__stream_decoder_delete'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x2f5): undefined reference to "FLAC__stream_decoder_process_single'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x302): undefined reference to "FLAC__stream_decoder_get_state'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x421): undefined reference to "FLAC__stream_decoder_new'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x494): undefined reference to "FLAC__stream_decoder_init_stream'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x49d): undefined reference to "FLAC__stream_decoder_process_until_end_of_metadata'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x562): undefined reference to "FLAC__stream_decoder_finish'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x56b): undefined reference to "FLAC__stream_decoder_delete'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x5ad): undefined reference to "FLAC__stream_decoder_new'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x63b): undefined reference to "FLAC__stream_decoder_init_stream'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x643): undefined reference to "FLAC__stream_decoder_process_until_end_of_metadata'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x64d): undefined reference to "FLAC__stream_decoder_finish'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x655): undefined reference to "FLAC__stream_decoder_delete'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x722): undefined reference to "FLAC__stream_decoder_finish'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x72b): undefined reference to "FLAC__stream_decoder_delete'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderFlac.cpp.obj):(.text+0x17a): undefined reference to "FLAC__stream_decoder_seek_absolute'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x11b): undefined reference to "ov_read'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x15e): undefined reference to "ov_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x1c3): undefined reference to "ov_open_callbacks'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x1d4): undefined reference to "ov_info'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x1ec): undefined reference to "ov_pcm_total'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x2ba): undefined reference to "ov_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x30b): undefined reference to "ov_test_callbacks'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x324): undefined reference to "ov_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0x384): undefined reference to "ov_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileReaderOgg.cpp.obj):(.text+0xb7): undefined reference to "ov_pcm_seek'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x192): undefined reference to "FLAC__stream_encoder_process_interleaved'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x54c): undefined reference to "FLAC__stream_encoder_finish'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x555): undefined reference to "FLAC__stream_encoder_delete'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x5ac): undefined reference to "FLAC__stream_encoder_finish'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x5b5): undefined reference to "FLAC__stream_encoder_delete'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x605): undefined reference to "FLAC__stream_encoder_new'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x618): undefined reference to "FLAC__stream_encoder_set_channels'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x626): undefined reference to "FLAC__stream_encoder_set_bits_per_sample'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x631): undefined reference to "FLAC__stream_encoder_set_sample_rate'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x643): undefined reference to "FLAC__stream_encoder_init_file'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x76c): undefined reference to "FLAC__stream_encoder_finish'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x775): undefined reference to "FLAC__stream_encoder_delete'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x9c2): undefined reference to "FLAC__stream_encoder_finish'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterFlac.cpp.obj):(.text+0x9cb): undefined reference to "FLAC__stream_encoder_delete'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x1ab): undefined reference to "vorbis_block_init'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x1b7): undefined reference to "vorbis_analysis_blockout'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x1cb): undefined reference to "vorbis_analysis'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x1da): undefined reference to "vorbis_bitrate_addblock'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x1e7): undefined reference to "vorbis_bitrate_flushpacket'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x1fb): undefined reference to "ogg_stream_packetin'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x207): undefined reference to "ogg_stream_flush'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x239): undefined reference to "vorbis_block_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x29f): undefined reference to "vorbis_analysis_buffer'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x314): undefined reference to "vorbis_analysis_wrote'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x3cd): undefined reference to "ogg_stream_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x3d5): undefined reference to "vorbis_dsp_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x3e1): undefined reference to "vorbis_info_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x472): undefined reference to "vorbis_analysis_wrote'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x52d): undefined reference to "ogg_stream_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x535): undefined reference to "vorbis_dsp_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x541): undefined reference to "vorbis_info_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x5e2): undefined reference to "vorbis_analysis_wrote'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x66c): undefined reference to "ogg_stream_init'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x674): undefined reference to "vorbis_info_init'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x689): undefined reference to "vorbis_encode_init_vbr'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x6ab): undefined reference to "vorbis_analysis_init'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x6f2): undefined reference to "vorbis_comment_init'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x729): undefined reference to "vorbis_analysis_headerout'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x735): undefined reference to "vorbis_comment_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x756): undefined reference to "ogg_stream_packetin'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x763): undefined reference to "ogg_stream_packetin'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x770): undefined reference to "ogg_stream_packetin'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x7b1): undefined reference to "ogg_stream_flush'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x868): undefined reference to "ogg_stream_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x870): undefined reference to "vorbis_dsp_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x878): undefined reference to "vorbis_info_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x923): undefined reference to "ogg_stream_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x92b): undefined reference to "vorbis_dsp_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0x933): undefined reference to "vorbis_info_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0xa16): undefined reference to "vorbis_analysis_wrote'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0xa5a): undefined reference to "vorbis_analysis_wrote'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0xacb): undefined reference to "ogg_stream_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0xad3): undefined reference to "vorbis_dsp_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0xafa): undefined reference to "vorbis_analysis_wrote'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundFileWriterOgg.cpp.obj):(.text+0xae7): undefined reference to "vorbis_info_clear'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x8): undefined reference to "__imp_alcMakeContextCurrent'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x1a): undefined reference to "__imp_alcDestroyContext'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x2c): undefined reference to "__imp_alcCloseDevice'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x4a): undefined reference to "__imp_alcOpenDevice'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x65): undefined reference to "__imp_alcCreateContext'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x7e): undefined reference to "__imp_alcMakeContextCurrent'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0xd3): undefined reference to "__imp_alListenerf'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0xf6): undefined reference to "__imp_alListener3f'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x106): undefined reference to "__imp_alListenerfv'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x1c8): undefined reference to "__imp_alcMakeContextCurrent'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x1da): undefined reference to "__imp_alcDestroyContext'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x1ec): undefined reference to "__imp_alcCloseDevice'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x229): undefined reference to "__imp_alListenerf'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x277): undefined reference to "__imp_alListener3f'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x30e): undefined reference to "__imp_alListenerfv'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x3a1): undefined reference to "__imp_alListenerfv'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x427): undefined reference to "__imp_alIsExtensionPresent'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x430): undefined reference to "__imp_alcMakeContextCurrent'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x43a): undefined reference to "__imp_alcDestroyContext'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x441): undefined reference to "__imp_alcCloseDevice'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x4cf): undefined reference to "__imp_alcIsExtensionPresent'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x5f1): undefined reference to "__imp_alGetEnumValue'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x60a): undefined reference to "__imp_alcMakeContextCurrent'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x611): undefined reference to "__imp_alcDestroyContext'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x61b): undefined reference to "__imp_alcCloseDevice'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x699): undefined reference to "__imp_alGetEnumValue'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x6b9): undefined reference to "__imp_alGetEnumValue'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text+0x6d9): undefined reference to "__imp_alGetEnumValue'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text$_ZNSt6vectorIN2sf4priv11AudioDeviceESaIS2_EED1Ev[_ZNSt6vectorIN2sf4priv11AudioDeviceESaIS2_EED1Ev]+0x1e): undefined reference to "__imp_alcMakeContextCurrent'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text$_ZNSt6vectorIN2sf4priv11AudioDeviceESaIS2_EED1Ev[_ZNSt6vectorIN2sf4priv11AudioDeviceESaIS2_EED1Ev]+0x25): undefined reference to "__imp_alcDestroyContext'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(AudioDevice.cpp.obj):(.text$_ZNSt6vectorIN2sf4priv11AudioDeviceESaIS2_EED1Ev[_ZNSt6vectorIN2sf4priv11AudioDeviceESaIS2_EED1Ev]+0x2c): undefined reference to "__imp_alcCloseDevice'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x13): undefined reference to "__imp_alGetSourcei'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x63): undefined reference to "__imp_alGenSources'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x74): undefined reference to "__imp_alSourcei'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0xcc): undefined reference to "__imp_alGenSources'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0xd6): undefined reference to "__imp_alSourcei'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0xf5): undefined reference to "__imp_alGetSourcef'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x10c): undefined reference to "__imp_alSourcef'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x173): undefined reference to "__imp_alGetSource3f'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x199): undefined reference to "__imp_alSource3f'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x1ac): undefined reference to "__imp_alGetSourcei'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x24f): undefined reference to "__imp_alSourcei'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x25e): undefined reference to "__imp_alDeleteSources'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x28f): undefined reference to "__imp_alSourcei'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x29e): undefined reference to "__imp_alDeleteSources'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x2ce): undefined reference to "__imp_alSourcef'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x2f7): undefined reference to "__imp_alSourcef'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x31a): undefined reference to "__imp_alSource3f'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x352): undefined reference to "__imp_alSource3f'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x36f): undefined reference to "__imp_alSourcei'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x38e): undefined reference to "__imp_alSourcef'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x3ae): undefined reference to "__imp_alSourcef'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x3d3): undefined reference to "__imp_alGetSourcef'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x403): undefined reference to "__imp_alGetSourcef'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x450): undefined reference to "__imp_alGetSource3f'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x473): undefined reference to "__imp_alGetSourcei'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x4a3): undefined reference to "__imp_alGetSourcef'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x4d3): undefined reference to "__imp_alGetSourcef'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x4fd): undefined reference to "__imp_alGetSourcef'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x51d): undefined reference to "__imp_alSourcef'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x58c): undefined reference to "__imp_alGetSource3f'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x5b2): undefined reference to "__imp_alSource3f'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x5c3): undefined reference to "__imp_alGetSourcei'
C:\msys64\ucrt64\lib\libsfml-audio-s.a(SoundSource.cpp.obj):(.text+0x5df): undefined reference to "__imp_alSourcei'

collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 2 second(s))
172 error(s), 0 warning(s) (0 minute(s), 2 second(s))

When I load up my SFML graphics demo, which compiles perfectly without the -STATIC flag, and apply said flag, here are the errors I get:

Code: [Select]
Build started on: 05-07-2024 at 08:55.18
Build ended on: 05-07-2024 at 08:55.22

-------------- Build: Release in Anti-QB64-Propaganda-v3-CodeBlocks (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -O2 -Wall -m64 -std=c++20 -DSFML_STATIC -IC:\msys64\ucrt64\include -IC:\msys64\ucrt64\include -c "D:\tjp\0010a - C++ and C\WALTERSMIND - SFML\Anti-QB64-Propaganda-v3-CodeBlocks\Anti-QB64-Propaganda.cpp" -o obj\Release\Anti-QB64-Propaganda.o

g++.exe -LC:\msys64\ucrt64\lib -LC:\msys64\ucrt64\lib -o bin\Release\Anti-QB64-Propaganda-v3-CodeBlocks.exe obj\Release\Anti-QB64-Propaganda.o -s -static -m64 -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lopengl32 -lfreetype -lgdi32 -lwinmm -mwindows

C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x684d): undefined reference to "png_create_read_struct'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6862): undefined reference to "png_create_info_struct'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6885): undefined reference to "png_set_longjmp_fn'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x68c3): undefined reference to "png_destroy_read_struct'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6900): undefined reference to "png_set_read_fn'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x690d): undefined reference to "png_read_info'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x694f): undefined reference to "png_get_IHDR'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x69e2): undefined reference to "png_set_expand_gray_1_2_4_to_8'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x69f5): undefined reference to "png_get_valid'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6a3f): undefined reference to "png_set_interlace_handling'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6a53): undefined reference to "png_set_filler'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6a60): undefined reference to "png_read_update_info'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6aa2): undefined reference to "png_get_IHDR'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6ae3): undefined reference to "png_set_read_user_transform_fn'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6bab): undefined reference to "png_read_image'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6bb8): undefined reference to "png_read_end'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6c0d): undefined reference to "png_set_tRNS_to_alpha'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6c17): undefined reference to "png_set_gray_to_rgb'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6c21): undefined reference to "png_set_packing'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6c2b): undefined reference to "png_set_strip_16'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6c38): undefined reference to "png_set_palette_to_rgb'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6c4c): undefined reference to "png_set_read_user_transform_fn'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6c81): undefined reference to "png_destroy_read_struct'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6d1a): undefined reference to "png_get_error_ptr'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6d38): undefined reference to "png_set_longjmp_fn'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x8aa2): undefined reference to "png_get_io_ptr'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x8ada): undefined reference to "png_get_error_ptr'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x8aea): undefined reference to "png_error'
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0xf91f): undefined reference to "BrotliDecoderDecompress'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x21b4): undefined reference to "hb_font_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x21bd): undefined reference to "hb_buffer_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x227e): undefined reference to "hb_blob_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x59c0): undefined reference to "hb_font_get_face'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5a0d): undefined reference to "hb_ot_tags_from_script_and_language'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5a88): undefined reference to "hb_set_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5ab0): undefined reference to "hb_ot_layout_collect_lookups'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5ab8): undefined reference to "hb_set_is_empty'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5ac5): undefined reference to "hb_set_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5b13): undefined reference to "hb_ot_layout_lookup_collect_glyphs'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5b1e): undefined reference to "hb_set_next'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5b27): undefined reference to "hb_set_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5b49): undefined reference to "hb_ot_layout_collect_lookups'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5b4e): undefined reference to "hb_set_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5b9b): undefined reference to "hb_ot_layout_lookup_collect_glyphs'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5ba6): undefined reference to "hb_set_next'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5c5c): undefined reference to "hb_ot_layout_lookup_would_substitute'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5c6f): undefined reference to "hb_set_next'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5cbd): undefined reference to "hb_set_subtract'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5cd7): undefined reference to "hb_set_next'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5d0c): undefined reference to "hb_set_next'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5d18): undefined reference to "hb_set_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5d20): undefined reference to "hb_set_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5d2a): undefined reference to "hb_set_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5d32): undefined reference to "hb_set_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5f7e): undefined reference to "hb_face_create_for_tables'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5f8c): undefined reference to "hb_face_set_index'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5f98): undefined reference to "hb_face_set_upem'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5fa0): undefined reference to "hb_font_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5fab): undefined reference to "hb_face_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5fb4): undefined reference to "hb_buffer_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x62d5): undefined reference to "hb_blob_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x62e3): undefined reference to "hb_face_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x62ee): undefined reference to "hb_blob_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7564): undefined reference to "hb_font_set_scale'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x759a): undefined reference to "hb_buffer_clear_contents'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x75b3): undefined reference to "hb_buffer_add_utf8'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x75bb): undefined reference to "hb_buffer_guess_segment_properties'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x75d3): undefined reference to "hb_shape'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x75e8): undefined reference to "hb_buffer_clear_contents'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x75fe): undefined reference to "hb_buffer_add_utf8'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7606): undefined reference to "hb_buffer_guess_segment_properties'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7617): undefined reference to "hb_shape'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7624): undefined reference to "hb_buffer_get_glyph_infos'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7634): undefined reference to "hb_buffer_get_glyph_infos'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7648): undefined reference to "hb_buffer_get_length'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x76d3): undefined reference to "hb_buffer_clear_contents'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7770): undefined reference to "hb_buffer_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x77bd): undefined reference to "hb_buffer_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x788f): undefined reference to "hb_buffer_get_glyph_infos'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x789d): undefined reference to "hb_buffer_get_glyph_positions'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x78bb): undefined reference to "hb_buffer_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7aab): undefined reference to "hb_buffer_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7d17): undefined reference to "hb_buffer_get_glyph_infos'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7d25): undefined reference to "hb_buffer_get_glyph_positions'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x8070): undefined reference to "hb_buffer_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x80bd): undefined reference to "hb_buffer_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x818f): undefined reference to "hb_buffer_get_glyph_infos'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x819d): undefined reference to "hb_buffer_get_glyph_positions'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x81bb): undefined reference to "hb_buffer_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x83e7): undefined reference to "hb_buffer_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x8641): undefined reference to "hb_buffer_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x877b): undefined reference to "hb_buffer_get_glyph_infos'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x8789): undefined reference to "hb_buffer_get_glyph_positions'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x91f9): undefined reference to "hb_buffer_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x9248): undefined reference to "hb_buffer_get_glyph_infos'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x9256): undefined reference to "hb_buffer_get_glyph_positions'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x9299): undefined reference to "hb_buffer_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x9309): undefined reference to "hb_buffer_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x9360): undefined reference to "hb_buffer_get_glyph_infos'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x936e): undefined reference to "hb_buffer_get_glyph_positions'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x93a9): undefined reference to "hb_buffer_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x94dd): undefined reference to "hb_buffer_get_glyph_infos'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x94eb): undefined reference to "hb_buffer_get_glyph_positions'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x74f1): undefined reference to "hb_buffer_create'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7504): undefined reference to "hb_buffer_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7cfc): undefined reference to "hb_buffer_destroy'
C:\msys64\ucrt64\lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x20f): undefined reference to "inflate'
C:\msys64\ucrt64\lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x465): undefined reference to "inflateReset'
C:\msys64\ucrt64\lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x4ec): undefined reference to "inflateEnd'
C:\msys64\ucrt64\lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x6dc): undefined reference to "inflateInit2_'
C:\msys64\ucrt64\lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x822): undefined reference to "inflateEnd'
C:\msys64\ucrt64\lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x93d): undefined reference to "inflateInit2_'
C:\msys64\ucrt64\lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x94e): undefined reference to "inflate'
C:\msys64\ucrt64\lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x95d): undefined reference to "inflateEnd'
C:\msys64\ucrt64\lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x9ba): undefined reference to "inflateEnd'
C:\msys64\ucrt64\lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x6c): undefined reference to "BZ2_bzDecompressEnd'
C:\msys64\ucrt64\lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x11d): undefined reference to "BZ2_bzDecompress'
C:\msys64\ucrt64\lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x32a): undefined reference to "BZ2_bzDecompressEnd'
C:\msys64\ucrt64\lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x380): undefined reference to "BZ2_bzDecompressInit'
C:\msys64\ucrt64\lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x612): undefined reference to "BZ2_bzDecompressInit'

collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 4 second(s))
121 error(s), 0 warning(s) (0 minute(s), 4 second(s))

Without compiling my own copy of SFML and doing some tests, I can't say for certain what the issues are, but I would assume that MSYS2's version wasn't compiled for complete static linking. At least parts of it. However, it does pose some questions for developers and maintainers.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
Re: SFML Audio not statically linking - Observation
« Reply #5 on: July 05, 2024, 04:05:41 pm »
-------------- Build: Release in SFML-Audio-Test-v1 (compiler: GNU GCC Compiler)---------------
g++.exe -LC:\msys64\ucrt64\include -LC:\msys64\ucrt64\lib -o bin\Release\SFML-Audio-Test-v1.exe obj\Release\SFML-Audio-Test-v1.o -s -m64 -lsfml-audio-s -lsfml-system-s -lwinmm -lFLAC -lvorbis -logg -lOpenAL
 
You're missing -lvorbisenc and -lvorbisfile.

It is. Sadly, I only discovered MSYS2 late last year. Of course, I had left Windows a few years back and only coded in Linux (Ubuntu, Mint, and some others) and on my Raspberry Pi 400 device. I had to come back to Windows when my wife finally talked me into going to college (33 years too late), as I needed the OS for school-related matters.
Depending on what you want to do, you can also get the "full" Linux experience with WSL2 on Windows these days.

One thing I haven't mentioned is when I use the -STATIC linker option. If I use that linker option (all MSYS2 stuff here) on the audio demo, here are all the errors I get:

-------------- Build: Release in SFML-Audio-Test-v1 (compiler: GNU GCC Compiler)---------------

g++.exe -LC:\msys64\ucrt64\include -LC:\msys64\ucrt64\lib -o bin\Release\SFML-Audio-Test-v1.exe obj\Release\SFML-Audio-Test-v1.o -s -static-libstdc++ -static -m64 -lOpenAL -lFLAC -lvorbisenc -lvorbisfile -lvorbis -logg -lsfml-audio-s -lsfml-system-s -lwinmm -lgdi32
 
That's again a linking order issue. You're linking OpenAL, FLAC, vorbis, etc. before sfml-audio, so the linker doesn't see the necessary symbols.

When I load up my SFML graphics demo, which compiles perfectly without the -STATIC flag, and apply said flag, here are the errors I get:

-------------- Build: Release in Anti-QB64-Propaganda-v3-CodeBlocks (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -O2 -Wall -m64 -std=c++20 -DSFML_STATIC -IC:\msys64\ucrt64\include -IC:\msys64\ucrt64\include -c "D:\tjp\0010a - C++ and C\WALTERSMIND - SFML\Anti-QB64-Propaganda-v3-CodeBlocks\Anti-QB64-Propaganda.cpp" -o obj\Release\Anti-QB64-Propaganda.o

g++.exe -LC:\msys64\ucrt64\lib -LC:\msys64\ucrt64\lib -o bin\Release\Anti-QB64-Propaganda-v3-CodeBlocks.exe obj\Release\Anti-QB64-Propaganda.o -s -static -m64 -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lopengl32 -lfreetype -lgdi32 -lwinmm -mwindows

C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x684d): undefined reference to "png_create_read_struct&#39;
...
C:\msys64\ucrt64\lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0xf91f): undefined reference to "BrotliDecoderDecompress&#39;
...
C:\msys64\ucrt64\lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x21b4): undefined reference to "hb_font_destroy&#39;
...
C:\msys64\ucrt64\lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x20f): undefined reference to "inflate&#39;
...
C:\msys64\ucrt64\lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x6c): undefined reference to "BZ2_bzDecompressEnd&#39;
 
Looks like the MSYS2 provided freetype library has been built with various additional flags, as such you'll have to link libpng, Brotli, HarfBuzz, gzip, and bzip

The way to find out what's missing, is to look at the provided reference name and *.obj name. If it's unclear, one can usually do a web search and quickly find what library the symbols belong to.

The freetype library SFML provides, usually comes with the least amount of additional options, since SFML doesn't really make use of them, but MSYS2 as a generic package manager will try to maximize the usage surface, since it could potentially be used in anything.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/