I am trying to run some OpenGL code in Eclipse with SDL but keep running into linkage errors. I have properly linked the SDL .a files (as I have tested them by themselves and they have worked) but when it comes to the libglew32.a and libopengl.a my program comes to a standstill. I have also inserted the
#define GLEW_STATIC.
Here is the error that keeps popping up.
main.o:main.cpp:(.text+0x28): undefined reference to `glewExperimental'
main.o:main.cpp:(.text+0x2e): undefined reference to `glewInit@0'
main.o:main.cpp:(.text+0xcc): undefined reference to `glClearColor@16'
main.o:main.cpp:(.text+0xf3): undefined reference to `glViewport@16'
main.o:main.cpp:(.text+0x153): undefined reference to `__glewGenVertexArrays'
main.o:main.cpp:(.text+0x16b): undefined reference to `__glewGenBuffers'
main.o:main.cpp:(.text+0x17b): undefined reference to `__glewBindVertexArray'
main.o:main.cpp:(.text+0x193): undefined reference to `__glewBindBuffer'
main.o:main.cpp:(.text+0x1bb): undefined reference to `__glewBufferData'
main.o:main.cpp:(.text+0x1cb): undefined reference to `__glewEnableVertexAttribArray'
main.o:main.cpp:(.text+0x203): undefined reference to `__glewVertexAttribPointer'
main.o:main.cpp:(.text+0x21b): undefined reference to `__glewBindBuffer'
main.o:main.cpp:(.text+0x22b): undefined reference to `__glewBindVertexArray'
main.o:main.cpp:(.text+0x263): undefined reference to `__glewDeleteVertexArrays'
main.o:main.cpp:(.text+0x277): undefined reference to `__glewDeleteBuffers'
main.o:main.cpp:(.text+0x2a8): undefined reference to `glClear@4'
main.o:main.cpp:(.text+0x2b8): undefined reference to `__glewBindVertexArray'
main.o:main.cpp:(.text+0x2d7): undefined reference to `glDrawArrays@12'
main.o:main.cpp:(.text+0x2e7): undefined reference to `__glewBindVertexArray'
I have solved the errors that come with an
__imp__gl.. and wgl
but not this current problem. Can someone please help me with my issue?