>>3298 (OP)
I don't know what it means that those symbols are there, and have no idea how linking actually works. But at least the archive isn't empty.
I have checked the declarations of the undefined symbols in the header against the definitions of them in the .c, and the signatures match exactly. I am able to compile and link the test program that the library comes with.
gcc lib/open-simplex-noise-in-c/open-simplex-noise-test.c -rdynamic lib/open-simplex-noise-in-c/bin/libopen-simplex-noise.a -lpng
libpng is only required by the test program, not the library itself.
So I suspect it's the link order of the original command:
... -rdynamic -lGLU -lGL -lSM -lICE -lX11 -lXext -lGLU -lGLEW -lglfw lib/open-simplex-noise-in-c/bin/libopen-simplex-noise.a -lGL -lSM -lICE -lX11 -lXext -lGLEW -lglfw
I have tried moving it to the start:
... -rdynamic lib/open-simplex-noise-in-c/bin/libopen-simplex-noise.a -lGLU -lGL -lSM -lICE -lX11 -lXext -lGLU -lGLEW -lglfw -lGL -lSM -lICE -lX11 -lXext -lGLEW -lglfw
and to the end:
... -rdynamic -lGLU -lGL -lSM -lICE -lX11 -lXext -lGLU -lGLEW -lglfw -lGL -lSM -lICE -lX11 -lXext -lGLEW -lglfw lib/open-simplex-noise-in-c/bin/libopen-simplex-noise.a
and receive the exact same errors as initially. I then tried putting it in literally every other possible position after -rdynamic, none of those succeeded either.
open-simplex-noise.c compiles with just:
gcc -c open-simplex-noise.c -Wall -Wpedantic
And the only warnings are about C99 long long constants:
open-simplex-noise.c: In function ‘open_simplex_noise’:
open-simplex-noise.c:194:16: warning: use of C99 long long integer constant [-Wlong-long]
seed = seed * 6364136223846793005LL + 1442695040888963407LL;
^
open-simplex-noise.c:194:40: warning: use of C99 long long integer constant [-Wlong-long]
seed = seed * 6364136223846793005LL + 1442695040888963407LL;
^
open-simplex-noise.c:195:16: warning: use of C99 long long integer constant [-Wlong-long]
seed = seed * 6364136223846793005LL + 1442695040888963407LL;
^
open-simplex-noise.c:195:40: warning: use of C99 long long integer constant [-Wlong-long]
seed = seed * 6364136223846793005LL + 1442695040888963407LL;
^
open-simplex-noise.c:196:16: warning: use of C99 long long integer constant [-Wlong-long]
seed = seed * 6364136223846793005LL + 1442695040888963407LL;
^
open-simplex-noise.c:196:40: warning: use of C99 long long integer constant [-Wlong-long]
seed = seed * 6364136223846793005LL + 1442695040888963407LL;
^
open-simplex-noise.c:198:17: warning: use of C99 long long integer constant [-Wlong-long]
seed = seed * 6364136223846793005LL + 1442695040888963407LL;
^
open-simplex-noise.c:198:41: warning: use of C99 long long integer constant [-Wlong-long]
seed = seed * 6364136223846793005LL + 1442695040888963407LL;
^
Clearly, since the test program works, the problem is with my code and not the library, it's header, or the .a. What could I have done to cause this?
To recap: .a and .h are just fine, linker is finding the .a, moving the library name around in the link command doesn't help, the declaration and definition signatures match.