You are not logged in.
Hi!
I'm try to build a very basic OpenGL application with freeglut. I include GL/glut.h to setup context but gcc complains about using GLdouble in glut.h:
/usr/include/GL/glu.h:300:54: error: ‘GLdouble’ has not been declared
I tried to declare a variable of type GLdouble and it also doesn't work for the same reason. I did use glut for about a year ago... But now I'm stuck.
GL/gl.h is present and all the typedefs are defined there.
Did anybody had the same issue? Not sure if it's my mistake or packaging issue or something else.
Compile with -std=c++11 -lpthread -lGL -lglut
Thanks.
Offline
Which mesa package do you have installed? The needed gl.h is only provided by [extra]/mesa, so is that installed?
EDIT: sorry, I need to learn to read better - you already have this info in your post.
Have you checked environment variables for anything that could be picked up by the preprocessor to skip relevant header sections?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Hi Axell,
I'm not an OpenGL expert, but can you provide the output of the following commands?
pacman -Qo /usr/include/GL/gl.h
pacman -Qo /usr/include/GL/glu.h
pacman -Qo /usr/include/GL/glut.h
Compile with -std=c++11 -lpthread -lGL -lglut
I'm assuming that your application is written in C++, so can you compile the following code or it fails too?
#include <GL/glut.h>
#include <iostream>
using namespace std;
int main(void)
{
GLdouble a = 123.456;
cout << "This is a GLdouble: " << a << endl;
}
Offline
Thanks for the replies.
can you compile the following code
and it did compile. So it seems that cmake setup has errors. Thank you! Will try to find out what is wrong with make files.
Offline