Skip to content
Advertisement

Add OpenGL to Linux Vscode

I followed this tutorial successfully. But it doesn’t explain how to configure on vscode. Glad is in this folder /usr/include and I did use sudo in the terminal to compile and generate a.out. How do I do that in vscode? I have this error output when I try to build task:

terminal

JavaScript

My tasks is configured like that:

tasks.json

JavaScript

How do I configure OpenGL vscode?

Advertisement

Answer

If anyone has the same problem I solved it adding these args in tasks.json

JavaScript

And the folder glad in /usr/include for some reason had a gray x on the folder icon and it couldn’t be accessed without sudo command. I deleted and made a glad empty folder and copied glad.h inside it. After that the code worked as expected in vscode.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement