I started studying how to integrate GLFW, GLAD and OpenGL in my Qt5 project. I am getting this stdlib.h
no such file or directory error.
The example I am trying to run is from official OpenGL documentation.
This document describes very well the procedure for running the project and from here all the other sessions.
My stdlib.h
is present on /usr/include/stdlib.h
as it is possible to see from this print screen:
In addition to that I have this strange error where the compiler expects curly brackets but could not figure out the reason of this error:
A more detailed description of the error is here:
I have been researching a lot this error, I looked here, and here and even I used this source but could not figure out what the problem is and how to link the library, which is already in the shown path.
The snipped of code is:
helloOpenGL.pro
TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += \
main.cpp
LIBS += -L "/usr/lib" \
-lX11 -lpthread -lXrandr -lXi -ldl -lGL
INCLUDEPATH += "/usr/include"
LIBS += -L "/usr/include/GLFW" \
-lglfw3
and the main includes I have on the main.cpp are the following:
#include <../glad/glad.h>
#include <../GLFW/glfw3.h>
#include <iostream>
#include <stdlib.h>
Thanks for shedding light on this issue.