I have been developing an openGL program. I decided I wanted to use the GLM include library for rotations and whatnot.
When I converted my code to c++, i.e. changed file names to .cpp and used g++ instead of gcc, the compiler complains about the gl functions not being declared in this scope.
I am definitely including the correct header file. I was getting a similar error when compiling under gcc, but I was able to manually declare the GL functions I wanted to use. As long as I linked the library everything was fine.
Now however, I either get the “not declared in this scope” error, or if i manually declare the functions, I get the error at link time of “undefined reference to” all the GL functions.
I am including the “-lGL” directive in my link command.
I have been reading about c++ being more order dependent on library references, but I have placed the link command before the object lib and after the object lib that is causing the problem.
Don’t know what to do at this point.
I figured it out. I was not defining the GL_GLEXT_PROTOTYPES for visibility to some functions.