I know, i already asked this question but it was tagged as duplicate but no other Question was answered with a answer that worked for me, so i have to ask this question again, beacuse the duplicate flag was not removed after i edited this question.
So here is my question (again):
i have a problem with Code::Blocks.
I want to try out some stuff i have learned about OpenGL and because of reasons i want to do it with Code::Blocks.
But every time i try to link the library (GLEW), i cannot compile my code.
obj\Debug\source\main.o:main.cpp:(.text+0x97): undefined reference to `ChoosePixelFormat@8'
obj\Debug\source\main.o:main.cpp:(.text+0xad): undefined reference to `SetPixelFormat@12'
obj\Debug\source\main.o:main.cpp:(.text+0xbb): undefined reference to `wglCreateContext@4'
obj\Debug\source\main.o:main.cpp:(.text+0xd0): undefined reference to `wglMakeCurrent@8'
obj\Debug\source\main.o:main.cpp:(.text+0xdf): undefined reference to `glMatrixMode@4'
obj\Debug\source\main.o:main.cpp:(.text+0xe7): undefined reference to `glLoadIdentity@0'
obj\Debug\source\main.o:main.cpp:(.text+0x103): undefined reference to `gluOrtho2D@32'
obj\Debug\source\main.o:main.cpp:(.text+0x112): undefined reference to `glMatrixMode@4'
obj\Debug\source\main.o:main.cpp:(.text+0x247): undefined reference to `GetStockObject@4'
obj\Debug\source\main.o:main.cpp:(.text+0x439): undefined reference to `GetStockObject@4'
obj\Debug\source\main.o:main.cpp:(.text+0x5b8): undefined reference to `wglMakeCurrent@8'
obj\Debug\source\main.o:main.cpp:(.text+0x5c6): undefined reference to `wglDeleteContext@4'
obj\Debug\source\main.o:main.cpp:(.text+0x64a): undefined reference to `wglMakeCurrent@8'
obj\Debug\source\main.o:main.cpp:(.text+0x65a): undefined reference to `wglDeleteContext@4'
obj\Debug\source\main.o:main.cpp:(.text+0x850): undefined reference to `glBegin@4'
obj\Debug\source\main.o:main.cpp:(.text+0x893): undefined reference to `glColor3ub@12'
obj\Debug\source\main.o:main.cpp:(.text+0x8a8): undefined reference to `glVertex2d@16'
obj\Debug\source\main.o:main.cpp:(.text+0x8b0): undefined reference to `glEnd@0'
I included GL/glew.h and GL/gl.h on the top of my code and the linker-settings are:
1. ...\glew\lib\Release\x64\glew32s.lib
2. ...\glew\lib\Release\x64\glew32.lib
This was the Build command:
mingw32-g++.exe -LE:...\glew-1.13.0\include -o bin\Debug\TestProject.exe obj\Debug\source\main.o ...\glew-1.13.0\lib\Release\x64\glew32s.lib ...\glew-1.13.0\lib\Release\x64\glew32.lib "...\glew-1.13.0\lib\Release MX\x64\glew32mxs.lib" "...\glew-1.13.0\lib\Release MX\x64\glew32mx.lib"
I tried all answers to previous questions and nothing worked for me... Even if i dont use any OpenGL Function i get this errors. I know what these Errors are and would know what i should do if they would come from me code, but i dont know what to do now.
Please remove the double-post-notation because the answers to the recommend question are not helpful for me.
I really hope you can help me. Thank you.