as the title says, linking glfw3 statically using -lglfw3 does nothing. on the other side, adding the libglfw3.a as an object to be linked works perfectly fine.
it happens for both precompiled binaries, and binaries compiled on my system.
i’m on a windows 10 x86_64 box, using the mingw chocolatey build (gcc version 12.2.0 (x86_64-posix-seh-rev2, Built by MinGW-W64 project)) with the target x86_64-w64-mingw32.
tl;dr:
gcc -lglfw3
doesn’t work, but
gcc libglfw3.a
works just fine
why?
edit: for clarification, by doing nothing i mean it does not link the symbols, as they get reported as undefined references.
i tried to be as short as possible, so i didn’t include details, but of course i did that, otherwise the compiler won’t find it at all and i wouldn’t be here in the first place.
the linker (i’m using gcc for linking) only complains about undefined references that are defined in libglfw3.a.