Use of GLUT Library in Qt under Windows platform

Source: Internet
Author: User

The Qglwidget form class in Qt is not included in the Glut tool library, no wonder the solid ball body is drawn in Myglwidget (a derived class that is qglwidget in my program) is said to be "Glutsolidsphere": identifier not found, That means there is no declaration of this function. The next step is to install the GLUT library:

1. Download the GLUT library Http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip first.

2. Unzip the downloaded files and move the Glut32.lib and Glut.lib two lib files to the./lib folder in the QT directory.

3. Move the Glut.dll and glut32.dll two dynamic link libraries to C:\windows\system32.

4. Move the glut.h file to \include\qtopengl in the QT directory and create the glut file (no suffix) so that the glut is installed and switched to its own program, Add "#include <glut>" to MyGLWidget.cpp (CPP for qglwidget derived classes) so that you can use the functions in glut.

Use of GLUT Library in Qt under Windows platform

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.