I tried to statically link SFML on macOS, version 12.3 (Monterey) and I built SFML and all its dependencies from source using the built-in LLVM toolchain (Clang) with the x86_64 architecture (because i386 and arm64 wouldn't work).
Now I'm at the stage were I'm trying to create a program with SFML, and I had it the same road block every time, ld: library not found for -lcrt0.o.
I tried doing my research on this error but I haven't been able to find anything useful that would fix this issue. I think its an issue with the libraries I'm linking (or the way I'm linking them).
Compile command:
clang++ -DSFML_STATIC -m64 -O0 -g -std=c++17 -Wall -Wpedantic -Wextra -I "./Include" -I "./Dependencies/SFML/include" -c "Source/Application.cpp" -o "Build/Darwin/Debug/Application.o"Linking Command:[/b]clang++ -logg -lflac -lvorbis -lvorbisenc -lvorbisfile -lopenal -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio -lsfml-network -static -ObjC "Build/Darwin/Debug/Application.o" -L "./Dependencies/SFML/Darwin" -o "Binary/Darwin/Debug/SFMLProgram"(For the keen eyes, the "-s" was omitted because the library files themselves didn't have the prefix even though I compiled the library statically.)