I'm working on an OpenGL project recently and decided to move to 64 bit, so i changed the compiler to g++ 4.9.2 which supports 64bit. I changed the other libraries to 64bit too, but only the system provided libs, Glu32 and OpenGL32, can't be found by the compiler. I installed the Windows SDK which provides the libraries in 64bit. Strangely these do also have the 32 suffix... whatever, probably for easier porting.
I've declared the Path C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64
in several ways as an additional library directory, relative, absolute and with wildcards (%ProgramFiles%/...) but none of them seemed to fit for the linker:
c:/Program Files (x86)/mingw-w64/i686-4.9.2-win32-sjlj-rt_v3-rev1/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lOpenGL32.Lib
c:/Program Files (x86)/mingw-w64/i686-4.9.2-win32-sjlj-rt_v3-rev1/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lGlU32.Lib
Compile instruction
g++ -m64 -o dist/Debug/MinGW_64-Windows/engine >>imagine some object files in here<< -Lresource/Glew/lib/Release/x64 -Lresource/SDL/x86_64-w64-mingw32/lib -L\"C\:\Program\ Files\Microsoft\ SDKs\Windows\v7.1\Lib\x64\" -lSDL2main -lSDL2 -lglew32 -lOpenGL32.Lib -lGlU32.Lib