Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [SOLVED]QT5 unable to build MySQL driver under ubuntu
QtWS25 Last Chance

[SOLVED]QT5 unable to build MySQL driver under ubuntu

Scheduled Pinned Locked Moved Installation and Deployment
20 Posts 2 Posters 17.3k 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.
  • M Offline
    M Offline
    mbnoimi
    wrote on last edited by
    #11

    Where you've installed Qt5 on your machine?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      anubhav87
      wrote on last edited by
      #12

      My Home Folder (Linux Mint 14.0)

      Thanks

      1 Reply Last reply
      0
      • A Offline
        A Offline
        anubhav87
        wrote on last edited by
        #13

        But i am still struggling with mysql.pro file where is this

        Thanks

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mbnoimi
          wrote on last edited by
          #14

          OK, try to do the following (considering installation directory is /home/usename/Qt5.0.2):

          @usename@usename-pc ~ $ sudo apt-get install tasksel
          usename@usename-pc ~ $ sudo tasksel install LAMP
          usename@usename-pc ~ $ sudo tasksel install libmysqlclient-dev
          usename@usename-pc ~ $ cd /home/usename/Qt5.0.2/5.0.2/Src/qtbase/src/plugins/sqldrivers/mysql
          usename@usename-pc ~ $ /home/usename/Qt5.0.2/5.0.2/gcc_64/bin/qmake "INCLUDEPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/x86_64-linux-gnu -lmysqlclient_r" mysql.pro
          usename@usename-pc ~ $ make
          usename@usename-pc ~ $ make install@

          1 Reply Last reply
          0
          • A Offline
            A Offline
            anubhav87
            wrote on last edited by
            #15

            As you said i did that too but again where is this mysql.pro

            my output as you said

            username@username ~ $ sudo tasksel
            [sudo] password for username:
            sudo: tasksel: command not found
            username@username ~ $ cd Qt5.0.0/5.0.0/
            username@username ~/Qt5.0.0/5.0.0 $ cd gcc_64/
            username@username ~/Qt5.0.0/5.0.0/gcc_64 $ cd plugins/
            username@username ~/Qt5.0.0/5.0.0/gcc_64/plugins $ cd sqldrivers/
            username@username ~/Qt5.0.0/5.0.0/gcc_64/plugins/sqldrivers $ /home/username/Q
            Qt5.0.0/ QT_APP/
            username@username ~/Qt5.0.0/5.0.0/gcc_64/plugins/sqldrivers $ /home/username/Qt5.0.0/5.0.0/gcc_64/bin/qm
            qmake qmlmin qmlscene
            qml1plugindump qmlplugindump qmltestrunner
            qmlbundle qmlprofiler qmlviewer
            username@username ~/Qt5.0.0/5.0.0/gcc_64/plugins/sqldrivers $ /home/username/Qt5.0.0/5.0.0/gcc_64/bin/qmake "INCLUDEPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/x86_64-linux-gnu

            ^C
            username@username ~/Qt5.0.0/5.0.0/gcc_64/plugins/sqldrivers $ /home/username/Qt5.0.0/5.0.0/gcc_64/bin/qmake "INCLUDEPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/x86_64-linux-gnu -lmysqlclient_r" mysql.pro
            Cannot find file: mysql.pro.
            username@username ~/Qt5.0.0/5.0.0/gcc_64/plugins/sqldrivers $

            Thanks

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mbnoimi
              wrote on last edited by
              #16

              First of all, Could you please put the log inside code format.

              give me the output of the following:
              @cd ~
              find ./ -name "mysql.pro"@

              1 Reply Last reply
              0
              • A Offline
                A Offline
                anubhav87
                wrote on last edited by
                #17

                I find query.txt located on my desktop it gives the correct location but for mysql.pro it return nothing

                username@username ~ $ find ./ -name "query.txt"
                ./Desktop/query.txt
                username@username ~ $ find ./ -name "mysql.pro"
                username@username ~ $

                Thanks

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mbnoimi
                  wrote on last edited by
                  #18

                  It seems that you didn't install Qt into your home directory. Try to run find where Qt installed.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    anubhav87
                    wrote on last edited by
                    #19

                    Below is the path where i have installed my qt
                    /home/myusername/Qt5.0.0

                    Thanks

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mbnoimi
                      wrote on last edited by
                      #20

                      Try to download recent Qt installer (currently 5.0.2) , through installation wizard choose all available components (it has Qt' source code). Then:

                      @cd ~
                      find ./ -name “mysql.pro”@

                      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