Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unable to compile when using QtDeclarative

    QML and Qt Quick
    5
    11
    6071
    Loading More Posts
    • 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.
    • D
      decko last edited by

      If I make an instance of QDeclarativeView my code is unable to compile and I get the following errors.

      @c:\Qt\qt-everywhere-opensource-src-4.7.0-rc1\lib/libQtDeclarative.a(qdeclarativevaluetype.o):qdeclarativevaluetype.cpp:(.text+0x4c8): undefined reference to `_imp___Z13qt_defaultDpiv'

      c:\Qt\qt-everywhere-opensource-src-4.7.0-rc1\lib/libQtDeclarative.a(qdeclarativevaluetype.o):qdeclarativevaluetype.cpp:(.text+0x552): undefined reference to `_imp___Z13qt_defaultDpiv'

      collect2: ld returned 1 exit status@

      Source:

      @#include <QApplication>
      #include <QtDeclarative/QDeclarativeView>

      int main(int argc, char * argv[])
      {
      QApplication app(argc, argv);
      QDeclarativeView view;

      return app.exec();
      }
      @

      Qmake project file

      @QT += declarative gui
      TEMPLATE = app
      TARGET =
      DEPENDPATH += .
      INCLUDEPATH += .

      Input

      SOURCES += main.cc@

      Does anyone have an idea what might be wrong? By the way I compiled qt statically if this has any impact.

      1 Reply Last reply Reply Quote 0
      • Y
        yan_ last edited by

        Hi

        Wich Qt version and compilator you use?

        "QExtend":http://www.developpez.net/forums/d906429/c-cpp/bibliotheques/qt/naissance-projet-qextend/
        "QEXtend Video":http://www.youtube.com/user/QEx...

        1 Reply Last reply Reply Quote 0
        • D
          decko last edited by

          Version 4.7.0-rc1 and mingw (gcc 4.4.1-tdm-2)

          1 Reply Last reply Reply Quote 0
          • T
            tobias.hunger last edited by

            What is the demangled symbol name that is missing? Run @c++filt _imp___Z13qt_defaultDpiv@ to find out:-)

            1 Reply Last reply Reply Quote 0
            • D
              decko last edited by

              [quote author="Tobias Hunger" date="1283943033"]What is the demangled symbol name that is missing? Run @c++filt _imp___Z13qt_defaultDpiv@ to find out:-)[/quote]

              I just get the same string back.

              1 Reply Last reply Reply Quote 0
              • M
                mbrasser last edited by

                This should now be fixed in the qt-qml staging branch (commit 0537750396ea519bbdf2b0fed086d535fc8c53b7).

                1 Reply Last reply Reply Quote 0
                • D
                  decko last edited by

                  [quote author="mbrasser" date="1284604738"]This should now be fixed in the qt-qml staging branch (commit 0537750396ea519bbdf2b0fed086d535fc8c53b7).[/quote]

                  Thanks, this solved the issue. I ran into 1 or 2 similar errors while building other modules and used the same fix to solve it.

                  1 Reply Last reply Reply Quote 0
                  • M
                    mbrasser last edited by

                    Great! Any chance you can raise a bug in the "tracker":http://bugreports.qt.nokia.com detailing what else needs to be fixed to compile correctly?

                    Thanks,
                    Michael

                    1 Reply Last reply Reply Quote 0
                    • D
                      decko last edited by

                      [quote author="mbrasser" date="1285027768"]Great! Any chance you can raise a bug in the "tracker":http://bugreports.qt.nokia.com detailing what else needs to be fixed to compile correctly?

                      Thanks,
                      Michael[/quote]

                      There were already a couple of issues but none of them had fixed for all the issues so I created a new one.

                      "http://bugreports.qt.nokia.com/browse/QTBUG-13767":http://bugreports.qt.nokia.com/browse/QTBUG-13767

                      1 Reply Last reply Reply Quote 0
                      • B
                        BlueTiger last edited by

                        Hmmm..... I'm having a similar issue using QT 4.7.0 with GCC 4.4.0, so I guess this wasn't fixed in the final release after all :(

                        After compiling statically (configure -static -release) I get the following error when issuing mingw32-make:

                        @g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
                        oc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o ....\bin\qmlviewer.exe object
                        _script.qmlviewer.Release -L"d:\dev\qt\qt\lib" -L"d:\dev\qt\qt\lib" -lmingw32 -
                        lqtmain -lQtDeclarative -lQtScript -lQtSvg -lQtSql -lQtXmlPatterns -lQtOpenGL -l
                        glu32 -lopengl32 -lQtGui -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspoo
                        l -lmsimg32 -lQtNetwork -lQtCore -lkernel32 -luser32 -lshell32 -luuid -lole32 -l
                        advapi32 -lws2_32
                        d:\dev\qt\qt\lib/libQtDeclarative.a(qdeclarativevaluetype.o):qdeclarativevaluety
                        pe.cpp:(.text+0x391): undefined reference to _imp___Z13qt_defaultDpiv' d:\dev\qt\qt\lib/libQtDeclarative.a(qdeclarativevaluetype.o):qdeclarativevaluety pe.cpp:(.text+0x408): undefined reference to _imp___Z13qt_defaultDpiv'
                        collect2: ld returned 1 exit status
                        mingw32-make[3]: *** [....\bin\qmlviewer.exe] Error 1
                        mingw32-make[3]: Leaving directory D:/dev/qt/qt/tools/qml' mingw32-make[2]: *** [release] Error 2 mingw32-make[2]: Leaving directory D:/dev/qt/qt/tools/qml'
                        mingw32-make[1]: *** [sub-qml-make_default-ordered] Error 2
                        mingw32-make[1]: Leaving directory `D:/dev/qt/qt/tools'
                        mingw32-make: *** [sub-tools-make_default-ordered] Error 2@

                        Any advice?

                        1 Reply Last reply Reply Quote 0
                        • D
                          decko last edited by

                          Perhaps it wasn't included in the release. If you get the tar ball from gitorious it probably works. "http://qt.gitorious.org/qt/qt/archive-tarball/4.7":http://qt.gitorious.org/qt/qt/archive-tarball/4.7

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post