Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Writing Qt3D application in windows
Forum Updated to NodeBB v4.3 + New Features

[Solved] Writing Qt3D application in windows

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 3.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hesam_GL
    wrote on last edited by
    #1

    I am going to write Qt3D application in windows. I have also installed necessary tools , but after compilation i receive 'unresolved external symbol' error. what is the solution?

    Note : compiler is microsoft visual c++ 9.0 , Qt version is 4.8.1 and I have installed "Qt3D binary package":http://labs.qt.nokia.com/2012/04/11/qt-3d-and-qt5-qt4-news-and-releases/.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      Which external symbol is unresolved? That's the key.

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hesam_GL
        wrote on last edited by
        #3

        These are two external symbol errors :
        1.viewer.obj:: error: unresolved external symbol __imp__glClearColor@16 referenced in function "private: virtual void __thiscall Viewer::initializeGL(class QGLPainter *)" (?initializeGL@Viewer@@EAEXPAVQGLPainter@@@Z)

        2.viewer.obj:: error: unresolved external symbol __imp__glClear@4 referenced in function "private: virtual void __thiscall Viewer::paintGL(class QGLPainter *)" (?paintGL@Viewer@@EAEXPAVQGLPainter@@@Z)

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cincirin
          wrote on last edited by
          #4

          Adding
          @
          LIBS += -lOpengl32
          @
          in your application project file ?
          Or if you use VC IDE, append Opengl32.lib in additional linker libraries list.

          1 Reply Last reply
          0
          • H Offline
            H Offline
            Hesam_GL
            wrote on last edited by
            #5

            this is my project file contents :
            @
            SOURCES +=
            main.cpp
            viewer.cpp

            LIBS += C:\Qt\4.8.1\lib\QtOpenGL4.lib
            C:\Qt\4.8.1\lib\Qt3D.lib \

            HEADERS +=
            viewer.h@

            before adding 'OpenGL32' compilation result is two external symbol error. after adding OpenGL32 compilation done successfully but application crashes. in fact i receive this error :
            The procedure entry point ??4QImage@@AEAAV0@$$QAV0@@Z could not be found in the dynamic link library QtGui4.dll

            1 Reply Last reply
            0
            • H Offline
              H Offline
              Hesam_GL
              wrote on last edited by
              #6

              I think it need additional explanations. the entry point error occurs when i link the program against OpenGL32 library. in other conditions such in this piece of code :

              @#include <QApplication>
              #include <QLabel>

              int main(int argc,char **argv)
              {
              QApplication app(argc,argv);
              QLabel *lbl = new QLabel;
              lbl->setText(QString("<h1>%1</h1>").arg(QT_VERSION_STR));
              lbl->show();
              return app.exec();
              }@

              program works properly and there is no trouble with QtGui4.

              1 Reply Last reply
              0
              • H Offline
                H Offline
                Hesam_GL
                wrote on last edited by
                #7

                Problem solved. I compiled Qt3D from source.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved