Jump to content

  • Log In with Google      Sign In   
  • Create Account

Compiling opengl code using gcc through the command line


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
53 replies to this topic

#41 4mad3u5   Members   -  Reputation: 116

Like
0Likes
Like

Posted 23 March 2014 - 06:16 PM

So I put the #include <GLTools.h> under the rest of my includes and I am still getting error messages 

// Triangle.cpp
// Our first OpenGL program that will just draw a triangle on the screen.


#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h> // Windows FreeGlut equivalent

#include <GLTools.h> // OpenGL toolkit


///////////////////////////////////////////////////////////////////////////////
// Window has changed size, or has just been created. In either case, we need
// to use the window dimensions to set the viewport and the projection matrix.
void ChangeSize(int w, int h)
{
    glViewport(0, 0, w, h);
}


///////////////////////////////////////////////////////////////////////////////
// Called to draw scene
void RenderScene(void)
{
    // Clear the window with current blue color
    glClearColor(0.0f, 0.0f, 1.0f, 1.0f );
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

    // Perform the buffer swap to display back buffer
    glutSwapBuffers();
}


///////////////////////////////////////////////////////////////////////////////
// Main entry point for GLUT based programs
int main(int argc, char* argv[])
{
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
    glutInitWindowSize(800, 600);
    glutCreateWindow("Triangle");
    glutReshapeFunc(ChangeSize);
    glutDisplayFunc(RenderScene);

    glutMainLoop();

    return 0;
}

And here are the error messages I am getting 

                 
 
 typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
                                                                                                                           ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9545:138: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
                                                                                                                                          ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9546:115: error: 'GLuint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT* value);
                                                                                                                   ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9546:128: error: ISO C++ forbids declaration of 'value' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT* value);
                                                                                                                                ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9547:69: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x);
                                                                     ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9548:91: error: 'GLint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT* value);
                                                                                           ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9548:103: error: ISO C++ forbids declaration of 'value' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT* value);
                                                                                                       ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9549:70: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x);
                                                                      ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9550:92: error: 'GLuint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
                                                                                            ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9550:105: error: ISO C++ forbids declaration of 'value' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
                                                                                                         ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9551:69: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);
                                                                     ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9551:83: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y);
                                                                                   ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9552:91: error: 'GLint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT* value);
                                                                                           ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9552:103: error: ISO C++ forbids declaration of 'value' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT* value);
                                                                                                       ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9553:70: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);
                                                                      ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9553:85: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y);
                                                                                     ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9554:92: error: 'GLuint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
                                                                                            ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9554:105: error: ISO C++ forbids declaration of 'value' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
                                                                                                         ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9555:69: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
                                                                     ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9555:83: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
                                                                                   ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9555:97: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z);
                                                                                                 ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9556:91: error: 'GLint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT* value);
                                                                                           ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9556:103: error: ISO C++ forbids declaration of 'value' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT* value);
                                                                                                       ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9557:70: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
                                                                      ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9557:85: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
                                                                                     ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9557:100: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
                                                                                                    ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9558:92: error: 'GLuint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
                                                                                            ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9558:105: error: ISO C++ forbids declaration of 'value' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
                                                                                                         ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9559:69: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
                                                                     ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9559:83: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
                                                                                   ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9559:97: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
                                                                                                 ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9559:111: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
                                                                                                               ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9560:91: error: 'GLint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT* value);
                                                                                           ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9560:103: error: ISO C++ forbids declaration of 'value' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT* value);
                                                                                                       ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9561:70: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
                                                                      ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9561:85: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
                                                                                     ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9561:100: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
                                                                                                    ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9561:115: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
                                                                                                                   ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9562:92: error: 'GLuint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
                                                                                            ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9562:105: error: ISO C++ forbids declaration of 'value' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
                                                                                                         ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9860:87: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT* params);
                                                                                       ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9862:88: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT* params);
                                                                                        ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9864:81: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId
, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
                                                                                 ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:9865:78: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, G
Lenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
                                                                              ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10011:94: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT* params);
                                                                                              ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10012:71: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT* result);
                                                                       ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10013:99: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT* params);
                                                                                                   ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10020:92: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value);
                                                                                            ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10021:114: error: 'GLuint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT* value);
                                                                                                                  ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10021:127: error: ISO C++ forbids declaration of 'value' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT* value);
                                                                                                                               ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10022:69: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value);
                                                                     ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10023:91: error: 'GLuint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
                                                                                           ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10023:104: error: ISO C++ forbids declaration of 'value' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT* value);
                                                                                                        ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10422:90: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT* params);
                                                                                          ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10423:91: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT* params);
                                                                                           ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10424:73: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x);
                                                                         ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10425:80: error: 'GLint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT* v);
                                                                                ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10425:92: error: ISO C++ forbids declaration of 'v' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT* v);
                                                                                            ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10426:74: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x);
                                                                          ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10427:81: error: 'GLuint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT* v);
                                                                                 ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10427:94: error: ISO C++ forbids declaration of 'v' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT* v);
                                                                                              ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10428:73: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y);
                                                                         ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10428:87: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y);
                                                                                       ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10429:80: error: 'GLint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT* v);
                                                                                ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10429:92: error: ISO C++ forbids declaration of 'v' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT* v);
                                                                                            ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10430:74: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y);
                                                                          ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10430:89: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y);
                                                                                         ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10431:81: error: 'GLuint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT* v);
                                                                                 ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10431:94: error: ISO C++ forbids declaration of 'v' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT* v);
                                                                                              ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10432:73: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
                                                                         ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10432:87: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
                                                                                       ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10432:101: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z);
                                                                                                     ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10433:80: error: 'GLint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT* v);
                                                                                ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10433:92: error: ISO C++ forbids declaration of 'v' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT* v);
                                                                                            ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10434:74: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
                                                                          ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10434:89: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
                                                                                         ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10434:104: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z);
                                                                                                        ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10435:81: error: 'GLuint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT* v);
                                                                                 ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10435:94: error: ISO C++ forbids declaration of 'v' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT* v);
                                                                                              ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10436:73: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
                                                                         ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10436:87: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
                                                                                       ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10436:101: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
                                                                                                     ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10436:115: error: 'GLint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w);
                                                                                                                   ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10437:80: error: 'GLint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT* v);
                                                                                ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10437:92: error: ISO C++ forbids declaration of 'v' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT* v);
                                                                                            ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10438:74: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
                                                                          ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10438:89: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
                                                                                         ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10438:104: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
                                                                                                        ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10438:119: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w);
                                                                                                                       ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10439:81: error: 'GLuint64EXT' does not name a type
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT* v);
                                                                                 ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10439:94: error: ISO C++ forbids declaration of 'v' with no type [-fpermissive]
 typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT* v);
                                                                                              ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10494:88: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length);
                                                                                        ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:10498:87: error: 'GLuint64EXT' has not been declared
 typedef void (GLAPIENTRY * PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT result[]);
                                                                                       ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:12597:17: error: 'PFNGLCLIENTWAITSYNCPROC' does not name a type
 GLEW_FUN_EXPORT PFNGLCLIENTWAITSYNCPROC __glewClientWaitSync;
                 ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:12598:17: error: 'PFNGLDELETESYNCPROC' does not name a type
 GLEW_FUN_EXPORT PFNGLDELETESYNCPROC __glewDeleteSync;
                 ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:12599:17: error: 'PFNGLFENCESYNCPROC' does not name a type
 GLEW_FUN_EXPORT PFNGLFENCESYNCPROC __glewFenceSync;
                 ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:12601:17: error: 'PFNGLGETSYNCIVPROC' does not name a type
 GLEW_FUN_EXPORT PFNGLGETSYNCIVPROC __glewGetSynciv;
                 ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:12602:17: error: 'PFNGLISSYNCPROC' does not name a type
 GLEW_FUN_EXPORT PFNGLISSYNCPROC __glewIsSync;
                 ^
F:\school\csci\opengl\SB5\Src\GLTools\include/gl\glew.h:12603:17: error: 'PFNGLWAITSYNCPROC' does not name a type
 GLEW_FUN_EXPORT PFNGLWAITSYNCPROC __glewWaitSync;
                 ^

F:\school\csci\opengl\SB5\Src\Chapter02\Triangle>

Edited by 4mad3u5, 23 March 2014 - 06:24 PM.


Sponsor:

#42 Kaptein   Prime Members   -  Reputation: 2148

Like
0Likes
Like

Posted 23 March 2014 - 06:37 PM

EDIT:

It seems GLTools.h includes glew.h. glew.h needs to be included before GL header files are included.

 

Go into your GLTools.h file.

Make sure this is how it includes the GL headers:

 

#include <GL/glew.h>

#include <GL/gl.h>

#include <GL/glu.h>

#include <GL/glut.h>

 

Now you only need to include GLTools.h in your main file.


Edited by Kaptein, 23 March 2014 - 06:41 PM.


#43 4mad3u5   Members   -  Reputation: 116

Like
0Likes
Like

Posted 23 March 2014 - 06:45 PM

So I threw them in there like this:

#ifndef __GLTOOLS__LIBRARY
#define __GLTOOLS__LIBRARY


// There is a static block allocated for loading shaders to 
// prevent heap fragmentation
#define MAX_SHADER_LENGTH   8192


// Bring in OpenGL 
// Windows
#ifdef WIN32
#include <windows.h>		// Must have for Windows platform builds
#ifndef GLEW_STATIC
#define GLEW_STATIC
#endif
#include <gl\glew.h>			// OpenGL Extension "autoloader"
#include <gl\gl.h>			// Microsoft OpenGL headers (version 1.1 by themselves)
#endif

// Mac OS X
#ifdef __APPLE__
#include <stdlib.h>

#include <TargetConditionals.h>
#if TARGET_OS_IPHONE | TARGET_IPHONE_SIMULATOR
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
#define OPENGL_ES
#else
#include <GL/glew.h>
#include <OpenGL/gl.h>		// Apple OpenGL haders (version depends on OS X SDK version)
#endif
#endif

// Linux
#ifdef linux
#define GLEW_STATIC
#include <glew.h>
#endif

//////////////////////// TEMPORARY TEMPORARY TEMPORARY - On SnowLeopard this is suppored, but GLEW doens't hook up properly
//////////////////////// Fixed probably in 10.6.3
#ifdef __APPLE__
#define glGenVertexArrays glGenVertexArraysAPPLE
#define glDeleteVertexArrays  glDeleteVertexArraysAPPLE
#define glBindVertexArray	glBindVertexArrayAPPLE
#ifndef OPENGL_ES
#define glGenerateMipmap    glGenerateMipmapEXT
#endif
#endif


// Universal includes
#include <stdio.h>
#include <math.h>
#include <math3d.h>
#include <GLBatch.h>
#include <GLTriangleBatch.h>

#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>

   
///////////////////////////////////////////////////////
// Macros for big/little endian happiness
// These are intentionally written to be easy to understand what they 
// are doing... no flames please on the inefficiency of these.
#ifdef __BIG_ENDIAN__
///////////////////////////////////////////////////////////
// This function says, "this pointer is a little endian value"
// If the value must be changed it is... otherwise, this
// function is defined away below (on Intel systems for example)
inline void LITTLE_ENDIAN_WORD(void *pWord)


#44 4mad3u5   Members   -  Reputation: 116

Like
0Likes
Like

Posted 23 March 2014 - 06:47 PM

GLTools.h was already in my main file or you mean my current working dir


Edited by 4mad3u5, 23 March 2014 - 06:55 PM.


#45 4mad3u5   Members   -  Reputation: 116

Like
0Likes
Like

Posted 23 March 2014 - 07:02 PM

Yeah I don't know I put them under everywhere I thought was appropriate and I kept getting the same results 



#46 4mad3u5   Members   -  Reputation: 116

Like
0Likes
Like

Posted 23 March 2014 - 07:31 PM

Should I have #include <GL/glew.h>with the rest of my headers in my main file? cuz right now all I have are gl.h glu.h and glut.h and when I put it in I get this error message

In file included from Triangle0.cpp:7:0:
c:\tdm-gcc-32\include\gl\glu.h:223:24: error: expected ')' before '*' token
 typedef void (APIENTRY *_GLUfuncptr)();
                        ^
c:\tdm-gcc-32\include\gl\glu.h:225:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluBeginCurve (GLUnurbs* nurb);
 ^
c:\tdm-gcc-32\include\gl\glu.h:226:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluBeginPolygon (GLUtesselator* tess);
 ^
c:\tdm-gcc-32\include\gl\glu.h:227:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluBeginSurface (GLUnurbs* nurb);
 ^
c:\tdm-gcc-32\include\gl\glu.h:228:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluBeginTrim (GLUnurbs* nurb);
 ^
c:\tdm-gcc-32\include\gl\glu.h:229:1: error: 'GLAPI' does not name a type
 GLAPI GLint APIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
 ^
In file included from Triangle0.cpp:7:0:
c:\tdm-gcc-32\include\gl\glu.h:230:1: error: 'GLAPI' does not name a type
 GLAPI GLint APIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, con
 ^
c:\tdm-gcc-32\include\gl\glu.h:231:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
 ^
c:\tdm-gcc-32\include\gl\glu.h:232:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
 ^
c:\tdm-gcc-32\include\gl\glu.h:233:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluDeleteQuadric (GLUquadric* quad);
 ^
c:\tdm-gcc-32\include\gl\glu.h:234:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluDeleteTess (GLUtesselator* tess);
 ^
c:\tdm-gcc-32\include\gl\glu.h:235:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
 ^
c:\tdm-gcc-32\include\gl\glu.h:236:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluEndCurve (GLUnurbs* nurb);
 ^
c:\tdm-gcc-32\include\gl\glu.h:237:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluEndPolygon (GLUtesselator* tess);
 ^
c:\tdm-gcc-32\include\gl\glu.h:238:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluEndSurface (GLUnurbs* nurb);
 ^
c:\tdm-gcc-32\include\gl\glu.h:239:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluEndTrim (GLUnurbs* nurb);
 ^
c:\tdm-gcc-32\include\gl\glu.h:240:1: error: 'GLAPI' does not name a type
 GLAPI const GLubyte * APIENTRY gluErrorString (GLenum error);
 ^
c:\tdm-gcc-32\include\gl\glu.h:241:1: error: 'GLAPI' does not name a type
 GLAPI const wchar_t * APIENTRY gluErrorUnicodeStringEXT (GLenum error);
 ^
c:\tdm-gcc-32\include\gl\glu.h:242:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
 ^
c:\tdm-gcc-32\include\gl\glu.h:243:1: error: 'GLAPI' does not name a type
 GLAPI const GLubyte * APIENTRY gluGetString (GLenum name);
 ^
c:\tdm-gcc-32\include\gl\glu.h:244:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
 ^
c:\tdm-gcc-32\include\gl\glu.h:245:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
 ^
c:\tdm-gcc-32\include\gl\glu.h:246:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble
Ldouble upZ);
 ^
c:\tdm-gcc-32\include\gl\glu.h:247:1: error: 'GLAPI' does not name a type
 GLAPI GLUnurbs* APIENTRY gluNewNurbsRenderer (void);
 ^
c:\tdm-gcc-32\include\gl\glu.h:248:1: error: 'GLAPI' does not name a type
 GLAPI GLUquadric* APIENTRY gluNewQuadric (void);
 ^
c:\tdm-gcc-32\include\gl\glu.h:249:1: error: 'GLAPI' does not name a type
 GLAPI GLUtesselator* APIENTRY gluNewTess (void);
 ^
c:\tdm-gcc-32\include\gl\glu.h:250:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
 ^
c:\tdm-gcc-32\include\gl\glu.h:251:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
 ^
c:\tdm-gcc-32\include\gl\glu.h:252:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum typ
 ^
c:\tdm-gcc-32\include\gl\glu.h:253:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
 ^
c:\tdm-gcc-32\include\gl\glu.h:254:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, G
t* control, GLint sOrder, GLint tOrder, GLenum type);
 ^
c:\tdm-gcc-32\include\gl\glu.h:255:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
 ^
c:\tdm-gcc-32\include\gl\glu.h:256:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble s
 ^
c:\tdm-gcc-32\include\gl\glu.h:257:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
 ^
c:\tdm-gcc-32\include\gl\glu.h:258:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
 ^
c:\tdm-gcc-32\include\gl\glu.h:259:1: error: 'GLAPI' does not name a type
 GLAPI GLint APIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *vie
Ldouble* winY, GLdouble* winZ);
 ^
c:\tdm-gcc-32\include\gl\glu.h:260:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
 ^
c:\tdm-gcc-32\include\gl\glu.h:261:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
 ^
c:\tdm-gcc-32\include\gl\glu.h:262:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
 ^
c:\tdm-gcc-32\include\gl\glu.h:263:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
 ^
c:\tdm-gcc-32\include\gl\glu.h:264:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
 ^
c:\tdm-gcc-32\include\gl\glu.h:265:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
 ^
c:\tdm-gcc-32\include\gl\glu.h:266:1: error: 'GLAPI' does not name a type
 GLAPI GLint APIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut,
oid* dataOut);
 ^
c:\tdm-gcc-32\include\gl\glu.h:267:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
 ^
c:\tdm-gcc-32\include\gl\glu.h:268:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluTessBeginContour (GLUtesselator* tess);
 ^
c:\tdm-gcc-32\include\gl\glu.h:269:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
 ^
c:\tdm-gcc-32\include\gl\glu.h:270:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
 ^
c:\tdm-gcc-32\include\gl\glu.h:271:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluTessEndContour (GLUtesselator* tess);
 ^
c:\tdm-gcc-32\include\gl\glu.h:272:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluTessEndPolygon (GLUtesselator* tess);
 ^
c:\tdm-gcc-32\include\gl\glu.h:273:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
 ^
c:\tdm-gcc-32\include\gl\glu.h:274:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
 ^
c:\tdm-gcc-32\include\gl\glu.h:275:1: error: 'GLAPI' does not name a type
 GLAPI void APIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
 ^
c:\tdm-gcc-32\include\gl\glu.h:276:1: error: 'GLAPI' does not name a type
 GLAPI GLint APIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *v
 GLdouble* objY, GLdouble* objZ);
 ^
c:\tdm-gcc-32\include\gl\glu.h:277:1: error: 'GLAPI' does not name a type
 GLAPI GLint APIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *pro
, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW); 

Edited by 4mad3u5, 23 March 2014 - 07:32 PM.


#47 4mad3u5   Members   -  Reputation: 116

Like
0Likes
Like

Posted 23 March 2014 - 08:01 PM

I just googled gcc GLTools.h and this was the first thing, getting errors just like me
 

 ran into the same problem as you did when trying to compile the Triangle example in the SuperBible (5th Edition). I also like to use Code::Blocks with MinGW. I have been doing some research, and I think I've managed to solve most issues.

The first thing to do is to correctly set up our environment. We start by configuring the libraries, freeglut and GLTools.

Before getting started, make sure you have the latest version of MinGW installed, with MSYS. Check that you added c:/MinGW/bin to the path variable. Also get a good file extractor like 7z, that can unpack .tar and .gz files.

I'm going to be perhaps too detailed, but these things were not obvious to me until I researched them.

To set up freeglut-2.6.0, the first thing we are going to do is compile the static library from the source:

  1. Go to freeglut's site and download the latest version (currently 2.6.0)

  2. Create a c:/libs directory, and unpack the freeglut package there. You should end up with a directory called c:/libs/freeglut-2.6.0.

  3. Run MSYS (c:/MinGW/msys/1.0/msys.bat). You should be in your home directory (denoted by ~ after your user and host in the top line).

  4. Type "cd /c/libs/freeglut-2.6.0/src" and press [enter]. The ~ will change to /c/libs/freeglut-2.6.0/src to denote your current working directory.

  5. Type "gcc -O2 -c -DFREEGLUT_STATIC *.c -I../include" and press [enter]. What we are doing here is calling the gcc compiler, instructing it to use O2 optimization, set the flag FREEGLUT_STATIC, and compile every source file in this directory into .o object files, and to look for headers in "../include". That means to go down one level (to /c/libs/freeglut-2.6.0) and look for the /include directory there.

  6. Type "ar rcs libfreeglut32_static.a *.o" and press enter. To the best of my understanding, ar is the utility that compiles static libraries, archive files (.a). We're telling it to create "libfreeglut32_static.a" from every object file (.o) we just compiled in the previous step.

  7. Create a /lib directory in /c/libs/freeglut-2.6.0. Then cut the library we just created and paste it in this directory. The final location of the freeglut library should be "c:/libs/freeglut-2.6.0/lib/libfreeglut32_static.a".



#48 4mad3u5   Members   -  Reputation: 116

Like
0Likes
Like

Posted 24 March 2014 - 05:22 PM

GLTools.h is not a standard library and was written by the people who wrote SB5 and is specificity meant to be used with visual studio express. 



#49 4mad3u5   Members   -  Reputation: 116

Like
0Likes
Like

Posted 24 March 2014 - 09:13 PM

Alright I got it, I had to go into SB5's GLTools folder is and include all the cpp file that define the functions that I am missing, got it thanks.  



#50 Erik Rufelt   Crossbones+   -  Reputation: 3478

Like
0Likes
Like

Posted 24 March 2014 - 10:19 PM

Nice, so it all worked out?

Always a hassle when using third-party libraries on platforms not directly intended.



#51 4mad3u5   Members   -  Reputation: 116

Like
0Likes
Like

Posted 24 March 2014 - 10:41 PM

yeah but I got it and learned a lot about adding header files, library files, static link libraries, dynamic link libraries and adding multiple files to project. 


Edited by 4mad3u5, 24 March 2014 - 10:41 PM.


#52 4mad3u5   Members   -  Reputation: 116

Like
0Likes
Like

Posted 24 March 2014 - 10:44 PM

lost 50 reputation points in the process cuz I didn't know this community was so sensitive to microsoft, and learned about flame baiting. 


Edited by 4mad3u5, 24 March 2014 - 10:45 PM.


#53 4mad3u5   Members   -  Reputation: 116

Like
0Likes
Like

Posted 24 March 2014 - 10:50 PM

-I header path

-L library path 

-l library file



#54 4mad3u5   Members   -  Reputation: 116

Like
0Likes
Like

Posted 24 March 2014 - 10:51 PM

Just get the definitions from the 5 cpp files that define GLTools.h and execute them in order and get the header files I need and use the standard open libraries. Package it all up in a library if I want. Take all the header files I am using put them all in a folder and all the other stuff in another, package it all up. Add freeglut to it and make it into a .a 


Edited by 4mad3u5, 24 March 2014 - 10:59 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS