Undefined reference to '_imp__ZN9QGLWidgetC2ERQ9QGLFormat...'



  • Hi there,

    I just quit MS .NET and started with QT. I was implementing an example from QT's tutorial "hellogl" starting from the scratch. I got the error message shown above + 14 more of them, related to formats and widgets. I searched every possible place to find answer why I have got this error message but I could not find any answer. So here I am! What is causing this error? Any idea?

    I am very surprized that such a small code will create so many error messages.

    Thanks for all the suggestions and help.
    OS : Windows7

    Regards



  • have you added opengl module t your pro file ?



  • I put this one in the header file :
    #include <QTOpenGL/QGLWidget>

    and the rest of the "Widget" code starts like this and foolows the example with a different name and namespace :

    class QtLogo;

    namespace VisualPresenters
    {

    class Canvas3D : public QGLWidget
    {
    
        Q_OBJECT
    
    public:
        Canvas3D(QWidget* parent = NULL);
    
        ~Canvas3D()
    

    Thanks for the response. Should I need to add more or am I missing something here?

    Regards.



  • You are right! I have added

    QT += opengl

    to .pro file and it seems that this part of the problem is solved.

    Thank you!



  • your welcome :D



  • NorskQt, welcome to the qt forum!
    Please use the @ tag for the source code in your post. thanks.



  • OK! Next time I will put @tag to my code snippets.

    Sorry! :o)



  • First: Qt is not QT(QuickTime)
    Second: What do version of Qt you use? May be it was build without opengl support?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.