Qt Forum

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

    undefined reference error to QsystemstorageInfo

    General and Desktop
    d them through
    3
    10
    1361
    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.
    • R
      Ravimettu last edited by

      error: undefined reference to QtMobility::QSystemStorageInfo::QSystemStorageInfo(QObject*) error: undefined reference to QtMobility::QSystemStorageInfo::logicalDrives()' error: undefined reference to QtMobility::QSystemStorageInfo::totalDiskSpace(QString const&)' error: undefined reference to QtMobility::QSystemStorageInfo::~QSystemStorageInfo()'
      error: undefined reference to `QtMobility::QSystemStorageInfo::~QSystemStorageInfo()'
      :-1: error: collect2: error: ld returned 1 exit status

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

        Hi and welcome to devnet,

        which version of Qt are you using? Which platform?

        No one has a crystal ball so you have to provide more information if you want help

        Once your problem is solved don't forget to:

        • Mark the thread as SOLVED using the Topic Tool menu
        • Vote up the answer(s) that helped you to solve the issue

        You can embed images using (http://imgur.com/) or (http://postimage.org/)

        1 Reply Last reply Reply Quote 0
        • R
          Ravimettu last edited by

          Hi iam using Qt 5.5 on Ubuntu 14.04 OS.

          I have installed both QtMobility and QStorageInfo and accessed them by including them in the .pro file as well as i have included them in include paths in the project properties, but still iam not able to access them properly.

          And when i saw in the folder QStorageInfo it has only header files, there is no code in them.

          Do i need to install anthing?

          jsulm 1 Reply Last reply Reply Quote 0
          • jsulm
            jsulm Lifetime Qt Champion @Ravimettu last edited by

            @Ravimettu Can you show your PRO file? It looks like you don't link against QtMobility libraries.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • R
              Ravimettu last edited by

              I have included them by using following lines.

              CONFIG += mobility
              MOBILITY += systeminfo

              INCLUDEPATH += /usr/include/QtMobility
              INCLUDEPATH += /usr/include/QtSystemInfo

              1 Reply Last reply Reply Quote 0
              • R
                Ravimettu last edited by

                The same code worked in 12.04 with Qt 4.8 but after migrating to Qt 5.5 and ubuntu 14.04 it got this error

                1 Reply Last reply Reply Quote 0
                • R
                  Ravimettu last edited by

                  I have installed Qt in opt. Is it ok? or i should install it in /usr/share

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

                    Hi,

                    as far as I know, QtMobility is not maintained in Qt 5.5; some classes was ported and included in Qt

                    Once your problem is solved don't forget to:

                    • Mark the thread as SOLVED using the Topic Tool menu
                    • Vote up the answer(s) that helped you to solve the issue

                    You can embed images using (http://imgur.com/) or (http://postimage.org/)

                    1 Reply Last reply Reply Quote 0
                    • R
                      Ravimettu last edited by

                      yes i agree

                      1 Reply Last reply Reply Quote 0
                      • R
                        Ravimettu last edited by

                        But i see only header files in the QSystemInfo package and in QtMobility
                        there are no .Cpp files or .so libraries

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