Results 1 to 4 of 4

Thread: Compile error with OpenGL: How to set parameter compilation project QtCreator 2.6.0

  1. #1
    Join Date
    Apr 2010
    Location
    Italia
    Posts
    106
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Compile error with OpenGL: How to set parameter compilation project QtCreator 2.6.0

    Hello to all. I have a project that uses calls to OpenGL, in particular, I'm:
    Qt Code:
    1. static GLUtesselator *tobj = NULL;
    2. tobj = gluNewTess();
    3. gluTessCallback(tobj, GLU_TESS_VERTEX, (GLvoid (*) ()) &glVertex3dv);
    4. ...
    To copy to clipboard, switch view to plain text mode 
    compiling I get this error message:
    Qt Code:
    1. C:\Qt\progetti\AreaRobot\blockgroup.cpp:187: error: invalid conversion from 'GLvoid (*)() {aka void (*)()}' to '_GLUfuncptr {aka void (*)()}' [-fpermissive]
    To copy to clipboard, switch view to plain text mode 
    I do not know how I can correct the error, can you help me ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Compile error with OpenGL: How to set parameter compilation project QtCreator 2.6

    Remove the ampersand.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Apr 2010
    Location
    Italia
    Posts
    106
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Compile error with OpenGL: How to set parameter compilation project QtCreator 2.6

    thanks, now I try to see if it works

  4. #4
    Join Date
    Apr 2010
    Location
    Italia
    Posts
    106
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Compile error with OpenGL: How to set parameter compilation project QtCreator 2.6

    The solution is this:
    Qt Code:
    1. gluTessCallback(tobj, GLU_TESS_VERTEX, (void (__stdcall *)(void))glVertex3dv);
    To copy to clipboard, switch view to plain text mode 
    ie:
    Qt Code:
    1. (void (__stdcall *)(void))glVertex3dv
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Problems in Qt 4.7.4 compilation with opengl es2
    By tharunkumar in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 27th November 2012, 06:57
  2. Compile QTCreator error
    By tonnot in forum Newbie
    Replies: 0
    Last Post: 12th November 2010, 09:45
  3. Replies: 2
    Last Post: 7th October 2010, 17:37
  4. cannot compile QT 4.6 as static - uic3 error stops compilation
    By rucs_hack in forum Installation and Deployment
    Replies: 3
    Last Post: 27th June 2010, 06:35
  5. Compilation error creating a project on QT4.0.1??
    By darpan in forum Qt Programming
    Replies: 6
    Last Post: 8th March 2006, 09:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.