c++ - GLFW Undefined References using Eclipse + MinGW on Windows 8 -
c++ - GLFW Undefined References using Eclipse + MinGW on Windows 8 -
i trying set glfw. working in eclipse cdt on windows 8.1
i have downloaded glfw binaries , trying run illustration code here http://www.glfw.org/documentation.html
so far have included glfw header , linking (statically) glfw3, opengl32 , gdi32 (in order).
the compiler running next commands
g++ "-ic:\\libraries\\glfw3\\include" -o0 -g3 -wall -c -fmessage-length=0 -o main.o "..\\main.cpp" g++ "-lc:\\libraries\\glfw3\\lib-mingw" -o helloglfw3.exe main.o -lglfw3 -lopengl32 -lgdi32
i error "undefined reference ..." each of glfw functions.
i can't figure out i'm doing wrong. have done google search , there similar questions asked on stack overflow none of them solved problems. mutual suggestion re-order linking order far can tell order correct, , tried in case made no difference.
can provide instruction on how link correctly?
edit: i've tried both 32bit , 64bit glfw binaries (my original effort 64 bit binaries google said may problem trying link 32 bit , 64 bit programs - can tell version of mingw can produce 32 bit outputs). these errors produced:
64bit binaries:
undefined reference `glfwcreatewindow' main.cpp /helloglfw3 line 12 c/c++ problem undefined reference `glfwinit' undefined reference `glfwmakecontextcurrent' undefined reference `glfwpollevents' undefined reference `glfwswapbuffers' undefined reference `glfwterminate' undefined reference `glfwterminate' undefined reference `glfwwindowshouldclose'
32bit binaries:
undefined reference `_imp__createdcw@16' helloglfw3 line 0, external location: c:\libraries\glfw3\i386\lib-mingw\libglfw3.a(win32_gamma.c.obj):win32_gamma.c c/c++ problem undefined reference `_imp__createdcw@16' undefined reference `_imp__deletedc@4' undefined reference `_imp__deletedc@4' undefined reference `_imp__describepixelformat@16' undefined reference `_imp__getdevicecaps@8' undefined reference `_imp__getdevicegammaramp@8' undefined reference `_imp__setdevicegammaramp@8' undefined reference `_imp__setpixelformat@12' undefined reference `_imp__swapbuffers@4'
glfw provides both 64bit , 32bit binary versions. when compile programme can produce either 64bit output or 32bit output. programme has compatible with libraries using.
this means because have 64bit computer doesn't mean need 64bit binaries. it's thought check compiler outputting think outputting.
c++ eclipse windows-8 glfw
Comments
Post a Comment