Hello,

I can compile a OpenGL application just fine doing so:

g++ -std=c++11 -o main Main.cpp FastNoise.cpp shader.cpp texture.cpp libglfw3.a lib
GLEW.a -Wl,-Bdynamic -lGL -lGLU -lX11 -lXxf86vm -lXrandr -lpthread -lXi -ldl -lXinerama -lXcursor

But if I compile it like this:

g++.exe -std=c++11 -o main Main.cpp FastNoise.cpp shader.cpp texture.cpp libglfw3.a lib
GLEW.a

Then I get tons of undefined reference errors. I have tried doing this under Ubuntu with MinGw64 and under Windows with MinGw and g++. I had the same issue under Visual Studio and I fixed it by adding this praeprocessor defintions:
WIN32
_WINDOWS
TW_STATIC
TW_NO_LIB_PRAGMA
TW_NO_DIRECT3D
GLEW_STATIC
_CRT_SECURE_NO_WARNINGS
CMAKE_INTDIR="Debug"

Is there any way to tell MinGw to use those praeprocessor defintions?