I have a Linux jni project (Jgles2 on github) which I'm trying to compile on windows.
With msys2 I have used pacman to install the following packages make, gcc, mingw-w64-x86_64-glfw, mingw-w64-x86_64-angleproject-git
I see lots of link error (none with glfw) like this
[exec] gcc -shared -o libJgles2.dll jni/util.o jni/gles2.o -L/mingw64/lib/ -lglfw3 -lgdi32 -lGLESv2
[exec] jni/gles2.o:gles2.c:(.text+0x25): undefined reference to `glBindFramebuffer'
[exec] jni/gles2.o:gles2.c:(.text+0x25): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `glBindFramebuffer'
... later ....
[exec] jni/gles2.o:gles2.c:(.text+0x2425): undefined reference to `glBindBuffer'
my makefile rule looks like this
CC=gcc
LIBS= -L/mingw64/lib/ -lglfw3 -lgdi32 -lGLESv2
libJgles2.dll: $(OBJ) jni/Jgles2_util.h jni/Jgles2_util.h jni/Jgles2_GLES2.h
$(CC) -shared -o $@ $(OBJ) $(LIBS)