Results 1 to 3 of 3

Thread: glutSolidSphere was not declared in this scope error

  1. #1
    Join Date
    May 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X

    Red face glutSolidSphere was not declared in this scope error

    hey i am compiling the file which i have attached to this post and i am getting the following error..i dont knw wats wrong with it...please help

    main.cpp:308: error: 'glutSolidSphere' was not declared in this scope
    Attached Files Attached Files

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: glutSolidSphere was not declared in this scope error

    I am not so familiar with OpenGL, but I guess you need some glut library / header.
    because glutSolidSphere doesnt seem to be Qt function...

  3. #3
    Join Date
    May 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: glutSolidSphere was not declared in this scope error

    yeah my problem is i dont knw to translate glutSolidSphere & glutSolidCube line to QT.....so can someone please guide me through how to do it...thank you

    Qt Code:
    1. void AntiAliasWidget::drawBasketBaloon()
    2. {
    3. glPushMatrix(); //Save the current transformation state
    4. glTranslatef(_height*1.7f-7.0f, 5.0f, -2.0f); //Move to the center of the baloon
    5. glColor3f(0.5f, 0.5f, 1.0f);
    6. glutSolidSphere(0.4f, 200, 200);
    7. glPopMatrix(); //Undo the move to the center of the baloon
    8. glPushMatrix(); //Save the current transformation state
    9. glTranslatef(_height*1.7f-7.0f, 4.0f, -2.0f); //Move to the center of the light
    10. glColor3f(1.0f, 0.7f, 0.0f);
    11. glutSolidCube(0.2f);
    12. glBegin(GL_LINES);
    13. glColor3f(0.0f, 0.0f, 0.0f); //Set color of the bar to black
    14. glVertex3f(0.0f, 0.7f, 0.0f);
    15. glVertex3f(0.1f, 0.0f, 0.1f);
    16. glVertex3f(0.0f, 0.7f, 0.0f);
    17. glVertex3f(0.1f, 0.0f, -0.1f);
    18. glVertex3f(0.0f, 0.7f, 0.0f);
    19. glVertex3f(-0.1f, 0.0f, 0.1f);
    20. glVertex3f(0.0f, 0.7f, 0.0f);
    21. glVertex3f(-0.1f, 0.0f, -0.1f);
    22. glEnd();
    23. glPopMatrix(); //Undo the move to the center of the baloon
    24. glFlush();
    25. }
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. nmake error during .pro compiling
    By mattia in forum Installation and Deployment
    Replies: 5
    Last Post: 18th June 2008, 10:15
  2. Compile 4.4.0
    By LordQt in forum Installation and Deployment
    Replies: 18
    Last Post: 29th May 2008, 13:43
  3. Just for fun game
    By vermarajeev in forum Qt-based Software
    Replies: 6
    Last Post: 13th December 2007, 21:52
  4. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 02:49
  5. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 12:19

Tags for this Thread

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.