Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [Solved]Manually building MySQL driver for newest SDK Download

[Solved]Manually building MySQL driver for newest SDK Download

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 2 Posters 3.7k 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.
  • B Offline
    B Offline
    bobby
    wrote on last edited by
    #1

    Hi Folks!

    I've been following "Manually Build QMYSQL":http://doc.qt.nokia.com/latest/sql-driver.html#qmysql but I can't seem to properly build the driver.

    Given the following:

    • I've downloaded the SDK and installed it to /home/bobby/QtSDK
    • I have Qt-4 installed locally, so I'm explicitly calling qmake from the QtSDK directory path
    • I am running Fedora 15. My include dir is /usr/include and my library path is /usr/lib for my installed version of MySQL

    How can I build the driver if by following the directions I get:

    @
    [bobby@localhost myql]$ /home/bobby/QtSDK/Desktop/Qt/473/gcc/bin/qmake "INCLUDEPATH+=/usr/include" "LIBS+=-L /usr/lib -lmysqlclient_r" mysql.pro
    [bobby@localhost myql]$ make
    g++ -Wl,-O1 -Wl,-rpath,/home/bobby/QtSDK/Desktop/Qt/473/gcc/lib -o mysql -L/home/bobby/QtSDK/Desktop/Qt/473/gcc/lib -L /usr/lib -lmysqlclient_r -lQtGui -lQtCore -lpthread
    /usr/bin/ld: cannot find -lmysqlclient_r
    collect2: ld returned 1 exit status
    make: *** [mysql] Error 1
    [bobby@localhost myql]$ ls
    @

    "Linux is not user-friendly." It is user-friendly. It is not ignorant-friendly and idiot-friendly.
    ---Source unknown

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      [quote author="bobby" date="1311801649"]Hi Folks!

      I've been following "Manually Build QMYSQL":http://doc.qt.nokia.com/latest/sql-driver.html#qmysql but [/quote]

      But...?

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bobby
        wrote on last edited by
        #3

        Sorry, I clicked post instead of preview :)

        "Linux is not user-friendly." It is user-friendly. It is not ignorant-friendly and idiot-friendly.
        ---Source unknown

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bobby
          wrote on last edited by
          #4

          EDIT: FIXED
          I decided to post this in the event that this comes up again. Currently (as of today's date) 4.7 is the stable tree.

          • Download the Qt 4.7-Stable Source
          • Run qt-qt/configure
          • Select the Open Source version, and agree to the license after reading it.
          • Use configure tool to enable databases.
          • Build with @gmake@ and @gmake install@
            *EDIT: Also soft link from your built plugins to $QTDIR/Desktop/Qt/473/gcc/plugins/sqldrivers/

          Obviously there isn't the src tree to build the drivers in the first place from the SDK .bin file I originally downloaded. If someone else can chime in that it SHOULD be there and I was right to think the documentation applied to the SDK download from the main website I'll file the proper bug report. If I was wrong and the src download is treated different I'll shush up, but only having a SQLight driver is pretty limited.

          Thanks Qt devs for a great product, I think I'll stick to building from sources. I appreciate you making them easily available on gitorious! For people who don't know where to find them, click "Qt 4.7-Stable":http://qt.gitorious.org/qt/qt/trees/4.7-stable

          "Linux is not user-friendly." It is user-friendly. It is not ignorant-friendly and idiot-friendly.
          ---Source unknown

          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