Original Post
I'm trying to get glut to work as in this tutorial: http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Chapter-2:-Hello-World:-The-Slideshow.html
EDIT: http://www.levelbylevel.com/blog/opengl-c-and-glut-using-codeblocks-and-mingw-updated/ (This is how I learned how to install glut and I assumed the same would work for glew)
However it tells me all references to glut and glew are undefined. I use codeblocks with MinGW as my compiler suite, I installed glut and glew by placing the dll's in system32, copying the headers to their places in the include/GL folder and copying the .libs into MinGW's lib folder.
The linker seems to have no trouble finding the libraries which I included in this order in the projects build options:
opengl32
glu32
glut32
glew32
Also it catches my eye that glewInit() doesn't seem to cause any trouble, but maybe that is a different problem.
This is the entire builder error log:
-------------- Build: Debug in Gloop ---------------
Linking console executable: bin\Debug\Gloop.exe
obj\Debug\main.o: In function
obj\Debug\main.o: In function
obj\Debug\main.o: In function
obj\Debug\main.o: In function
obj\Debug\main.o: In function
D:/programming/projects/Gloop/main.c:31: undefined reference to
D:/programming/projects/Gloop/main.c:34: undefined reference to
D:/programming/projects/Gloop/main.c:47: undefined reference to `glutMainLoop'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
10 errors, 0 warnings
EDIT: http://www.levelbylevel.com/blog/opengl-c-and-glut-using-codeblocks-and-mingw-updated/ (This is how I learned how to install glut and I assumed the same would work for glew)
However it tells me all references to glut and glew are undefined. I use codeblocks with MinGW as my compiler suite, I installed glut and glew by placing the dll's in system32, copying the headers to their places in the include/GL folder and copying the .libs into MinGW's lib folder.
The linker seems to have no trouble finding the libraries which I included in this order in the projects build options:
opengl32
glu32
glut32
glew32
Also it catches my eye that glewInit() doesn't seem to cause any trouble, but maybe that is a different problem.
This is the entire builder error log:
-------------- Build: Debug in Gloop ---------------
Linking console executable: bin\Debug\Gloop.exe
obj\Debug\main.o: In function
glutInit_ATEXIT_HACK':
c:/program files/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../include/GL/glut.h:486: undefined reference to __glutInitWithExit'obj\Debug\main.o: In function
glutCreateWindow_ATEXIT_HACK':
c:/program files/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../include/GL/glut.h:503: undefined reference to __glutCreateWindowWithExit'obj\Debug\main.o: In function
glutCreateMenu_ATEXIT_HACK':
c:/program files/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../include/GL/glut.h:549: undefined reference to __glutCreateMenuWithExit'obj\Debug\main.o: In function
render':
D:/programming/projects/Gloop/main.c:25: undefined reference to glutSwapBuffers'obj\Debug\main.o: In function
main':
D:/programming/projects/Gloop/main.c:30: undefined reference to glutInitDisplayMode'D:/programming/projects/Gloop/main.c:31: undefined reference to
glutInitWindowSize'
D:/programming/projects/Gloop/main.c:33: undefined reference to glutDisplayFunc'D:/programming/projects/Gloop/main.c:34: undefined reference to
glutIdleFunc'
D:/programming/projects/Gloop/main.c:37: undefined reference to _imp____GLEW_VERSION_2_0'D:/programming/projects/Gloop/main.c:47: undefined reference to `glutMainLoop'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
10 errors, 0 warnings