Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt MySql Drivers Mess.
Forum Updated to NodeBB v4.3 + New Features

Qt MySql Drivers Mess.

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.6k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    Ar2uR
    wrote on 19 Jan 2014, 23:07 last edited by
    #1

    Hi My Gurus.
    I'm new to Qt but after writing flew small GUI programs I'm in love with it, but my love isn't without hard times to.
    Ok to the core ... I decided my new app need a connection to MySql database, after a long day of terror with MinGW32, missing includes etc. I'm managed to compile correct Driver for Qt 5.1. It works :).
    All was fine to moment when I tried to deploy main little app.
    Normally I will used 4.8.5 to deploy but because I'm compiled a driver for 5.1 I'm stick to it.
    It turns one of libs libstdc++-6.lib bring a fight, I found i have 4 version of this lib, and any want work.
    I copy one after another to MinGW and qt to compile against this correct to run this thing but no luck.
    Ok Im decided to give its one more go. on another PC I'm downloaded fresh Qt 5.2
    and opened project in it, compiling first drivers for it.
    and there is a problem

    this statement in my 5.1 working ok in 5.2 compiler trowing a error.
    QSqlDatabase db = QsqlDatabase::addDatabase;

    d:\ssd\QtP\Fleet-Tool\mysqldialog.h:47: error: 'QsqlDatabase' has not been declared

    but in 5.1 no problem ?

    when I use this
    QSqlDatabase db;
    and next
    db.addDatabase;
    compiler not protesting but program when run trowing no driver loaded ?

    A question from other barrel.
    Why some plug-ins can't be easily accessible in installation or there is no ready compiled versions of them ?

    And why there is no automatic deploying system for Windows & Linux ? it can easily just copy required files to release folder ?

    thx Ar2ur

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Ar2uR
      wrote on 20 Jan 2014, 02:08 last edited by
      #2

      Ok My bad :) I found solution.

      error was result of numb mistake, I installed new Qt 5.2 but it configure itself with my old Qt 4.8.5, after switching to 5.2 it compile ok.

      Secondary Big THANK YOU to DIGA for shipping MySql drivers along with Qt. Qt5.2 has all libs and dll's with it no more compilation headache.

      now i need to solve this libsdc++-6.lib problem ;/

      1 Reply Last reply
      0
      • S Offline
        S Offline
        stereomatching
        wrote on 20 Jan 2014, 03:56 last edited by
        #3

        libsdc++-6.dll should come with the package of Qt5.2, are you trying to ship the exe to anthoer computer?Or you forgot to update your environment path?

        ps : the mysql driver of Qt need depend on libmysql.dll

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Ar2uR
          wrote on 20 Jan 2014, 08:34 last edited by
          #4

          Yes I'm tried to ship it problem was libdc++-6.lib was somewhere in system paths and even if i put correct one in a folder with application other was used. After editing paths seems to working fine :).

          Question? there is any way to force application to search first in installation folder for those libs in case something like that happens on other machine ?

          1 Reply Last reply
          0

          1/4

          19 Jan 2014, 23:07

          • Login

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