akira.kuukisuzu akira.kuukisuzu - 2 years ago 203
Linux Question

Linux QT GCC OpenGL GLEW - add parameters to compiller

I want to create example GLFW file in C++.
When I type in Terminal

gcc FILENAME.cpp -lGL -lGLEW -lglfw
everything is OK,
When I want to use CTRL+B to build my file in Qt Creator,
I see error
undefined reference to glfwInit
. I know I must add flags
-lGL -lGLEW -lglfw
, I tried to add
in my
file, but it does not work.

What is correct way to do this?

Answer Source

Wrong variable. You want

LIBS += -lGL -lGLEW -lglfw
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download