L
L
LVitA2016-10-27 01:01:00
OpenGL
LVitA, 2016-10-27 01:01:00

Why can't CLion find the function?

Good day to all! Started learning OpenGL and immediately ran into a problem!
I included the library, but when compiling, it says " undefined reference to `glGetString' ". I don't know what the problem is, if anyone knows, please explain what is wrong?

PS: using Linux + IDE CLion

8afc404b3be34d3b8d9468af5708edb7.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Moseychuk, 2016-10-27
@fshp

You have included only the header file. You have an error at the linking stage, because opengl libraries are not linked.
You need to connect the module https://cmake.org/cmake/help/v3.0/module/FindOpenG...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question