Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Unable to compile when using QtDeclarative
QtWS25 Last Chance

Unable to compile when using QtDeclarative

Scheduled Pinned Locked Moved QML and Qt Quick
11 Posts 5 Posters 6.6k Views
  • 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 Offline
    D Offline
    decko
    wrote on last edited by
    #1

    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
    0
    • Y Offline
      Y Offline
      yan_
      wrote on last edited by
      #2

      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
      0
      • D Offline
        D Offline
        decko
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • D Offline
            D Offline
            decko
            wrote on last edited by
            #5

            [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
            0
            • M Offline
              M Offline
              mbrasser
              wrote on last edited by
              #6

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

              1 Reply Last reply
              0
              • D Offline
                D Offline
                decko
                wrote on last edited by
                #7

                [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
                0
                • M Offline
                  M Offline
                  mbrasser
                  wrote on last edited by
                  #8

                  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
                  0
                  • D Offline
                    D Offline
                    decko
                    wrote on last edited by
                    #9

                    [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
                    0
                    • B Offline
                      B Offline
                      BlueTiger
                      wrote on last edited by
                      #10

                      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
                      0
                      • D Offline
                        D Offline
                        decko
                        wrote on last edited by
                        #11

                        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
                        0

                        • Login

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