Niezdefiniowane odniesienie do „imp____glewEnableVertexAttribArray”

Próbuję skompilować program, który robię z samouczka napisanego w C ++ i otworzyć gl 2.1. Jednak nie lubię FreeGLUT, więc postanowiłem zmienić program okienkowania na SFML. Mój problem polega jednak na tym, że kiedy próbuję zbudować program, otrzymuję następujące błędy:

obj\Debug\main.o||In function `Z6renderv':|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|36|undefined reference to `_imp____glewUseProgram'|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|37|undefined reference to `_imp____glewEnableVertexAttribArray'|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|52|undefined reference to `_imp____glewVertexAttribPointer'|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|56|undefined reference to `_imp____glewDisableVertexAttribArray'|
obj\Debug\main.o||In function `Z11initShadersv':|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|62|undefined reference to `_imp____glewCreateProgram'|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|67|undefined reference to `_imp____glewLinkProgram'|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|68|undefined reference to `_imp____glewGetProgramiv'|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|76|undefined reference to `_imp____glewGetAttribLocation'|
obj\Debug\main.o||In function `Z16initVertexShaderv':|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|86|undefined reference to `_imp____glewCreateShader'|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|95|undefined reference to `_imp____glewShaderSource'|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|96|undefined reference to `_imp____glewCompileShader'|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|97|undefined reference to `_imp____glewGetShaderiv'|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|103|undefined reference to `_imp____glewAttachShader'|
obj\Debug\main.o||In function `Z18initFragmentShaderv':|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|109|undefined reference to `_imp____glewCreateShader'|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|119|undefined reference to `_imp____glewShaderSource'|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|120|undefined reference to `_imp____glewCompileShader'|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|121|undefined reference to `_imp____glewGetShaderiv'|
C:\Users\Jordanh\Documents\Code Blocks\GL_2-Lesson-1\main.cpp|128|undefined reference to `_imp____glewAttachShader'|
||=== Build finished: 18 errors, 0 warnings ===|

W programie umieściłem następujące biblioteki:

#include <GL/glew.h>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>

Łączę je również:

-lsfml-system
-lsfml-window
-lopengl32
-lglu32
-lglew32

questionAnswers(3)

yourAnswerToTheQuestion