I spended too much time for linking GLFW and glad with w64devkit. I always getting errors like “undefined reference to Winmain” and other errors. I readed all documentation from the website and, I watched tutorials on YouTube and tryed to found information from other internet resources, but it still doesn’t work.
My project structure looks like this:
project
…include
…GLFW
…glfw3.h
…glfw3native.h
…glad
…glad.h
…KHR
…khrplatform.h
…lib
…libglfw3.a
…glad.c
…main.c
…Makefile
My Makefile looks like this:
app.exe : glad.o main.o
gcc glad.o main.o -lgdi32 -I include lib\libglfw3.a -o app.exe
glad.o : glad.c
gcc -c glad.c -lgdi32 -I include lib\libglfw3.a -o glad.o
main.o : main.c
gcc -c main.c -lgdi32 -I include lib\libglfw3.a -o main.o
clear :
rm *.o app.exe
I tryed to switch w64devkit on Cygwin, Winlibs, MSYS2, TDM-GCC, but it still doesn’t work.
Sorry my english can be bad(I writed this topic without translator)
Im newbie on GLFW forums
Thanks in advance for help