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. Problem to make MySql driver in Qt 5.4
QtWS25 Last Chance

Problem to make MySql driver in Qt 5.4

Scheduled Pinned Locked Moved General and Desktop
mysql 64bitqt5.4makefile
7 Posts 2 Posters 3.9k 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.
  • S Offline
    S Offline
    ShiniGami
    wrote on last edited by
    #1

    make Output like this
    /usr/lib/x86_64-linux-gnu/qt5/bin/moc -DQT_NO_MTDEV -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I/home/shinigami/Qt/5.4/Src/qtbase/mkspecs/linux-g++-64 -I/home/shinigami/Qt/5.4/Src/qtbase/src/plugins/sqldrivers/mysql -I/usr/include/mysql -I/usr/include/qt5/QtSql/5.2.1 -I/usr/include/qt5/QtSql/5.2.1/QtSql -I/usr/include/qt5 -I/usr/include/qt5/QtSql -I/usr/include/qt5/QtCore/5.2.1 -I/usr/include/qt5/QtCore/5.2.1/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/4.8 -I/usr/include/x86_64-linux-gnu/c++/4.8 -I/usr/include/c++/4.8/backward -I/usr/lib/gcc/x86_64-linux-gnu/4.8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include main.cpp -o .moc/main.moc
    g++ -c -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -I/usr/include/mysql -O2 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I../../../../mkspecs/linux-g++-64 -I. -I/usr/include/mysql -I/usr/include/qt5/QtSql/5.2.1 -I/usr/include/qt5/QtSql/5.2.1/QtSql -I/usr/include/qt5 -I/usr/include/qt5/QtSql -I/usr/include/qt5/QtCore/5.2.1 -I/usr/include/qt5/QtCore/5.2.1/QtCore -I/usr/include/qt5/QtCore -I.moc -o .obj/main.o main.cpp
    /usr/lib/x86_64-linux-gnu/qt5/bin/moc -DQT_NO_MTDEV -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I/home/shinigami/Qt/5.4/Src/qtbase/mkspecs/linux-g++-64 -I/home/shinigami/Qt/5.4/Src/qtbase/src/plugins/sqldrivers/mysql -I/usr/include/mysql -I/usr/include/qt5/QtSql/5.2.1 -I/usr/include/qt5/QtSql/5.2.1/QtSql -I/usr/include/qt5 -I/usr/include/qt5/QtSql -I/usr/include/qt5/QtCore/5.2.1 -I/usr/include/qt5/QtCore/5.2.1/QtCore -I/usr/include/qt5/QtCore -I/usr/include/c++/4.8 -I/usr/include/x86_64-linux-gnu/c++/4.8 -I/usr/include/c++/4.8/backward -I/usr/lib/gcc/x86_64-linux-gnu/4.8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include ../../../sql/drivers/mysql/qsql_mysql.cpp -o .moc/qsql_mysql.moc
    g++ -c -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -I/usr/include/mysql -O2 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I../../../../mkspecs/linux-g++-64 -I. -I/usr/include/mysql -I/usr/include/qt5/QtSql/5.2.1 -I/usr/include/qt5/QtSql/5.2.1/QtSql -I/usr/include/qt5 -I/usr/include/qt5/QtSql -I/usr/include/qt5/QtCore/5.2.1 -I/usr/include/qt5/QtCore/5.2.1/QtCore -I/usr/include/qt5/QtCore -I.moc -o .obj/qsql_mysql.o ../../../sql/drivers/mysql/qsql_mysql.cpp
    In file included from /home/shinigami/Qt/5.4/Src/qtbase/include/QtSql/5.4.2/QtSql/private/qsqldriver_p.h:1:0,
    from ../../../sql/drivers/mysql/qsql_mysql.cpp:36:
    /home/shinigami/Qt/5.4/Src/qtbase/include/QtSql/5.4.2/QtSql/private/../../../../../src/sql/kernel/qsqldriver_p.h:71:5: error: ‘DbmsType’ in ‘class QSqlDriver’ does not name a type
    QSqlDriver::DbmsType dbmsType;
    ^
    /home/shinigami/Qt/5.4/Src/qtbase/include/QtSql/5.4.2/QtSql/private/../../../../../src/sql/kernel/qsqldriver_p.h: In constructor ‘QSqlDriverPrivate::QSqlDriverPrivate()’:
    /home/shinigami/Qt/5.4/Src/qtbase/include/QtSql/5.4.2/QtSql/private/../../../../../src/sql/kernel/qsqldriver_p.h:64:9: error: class ‘QSqlDriverPrivate’ does not have any field named ‘dbmsType’
    dbmsType(QSqlDriver::UnknownDbms)
    ^
    /home/shinigami/Qt/5.4/Src/qtbase/include/QtSql/5.4.2/QtSql/private/../../../../../src/sql/kernel/qsqldriver_p.h:64:18: error: ‘UnknownDbms’ is not a member of ‘QSqlDriver’
    dbmsType(QSqlDriver::UnknownDbms)
    ^
    ../../../sql/drivers/mysql/qsql_mysql.cpp: In constructor ‘QMYSQLDriverPrivate::QMYSQLDriverPrivate()’:
    ../../../sql/drivers/mysql/qsql_mysql.cpp:81:40: error: ‘dbmsType’ was not declared in this scope
    preparedQuerysEnabled(false) { dbmsType = QSqlDriver::MySqlServer; }
    ^
    ../../../sql/drivers/mysql/qsql_mysql.cpp:81:51: error: ‘MySqlServer’ is not a member of ‘QSqlDriver’
    preparedQuerysEnabled(false) { dbmsType = QSqlDriver::MySqlServer; }
    ^
    make: *** [.obj/qsql_mysql.o] Error 1

    I try many things but no solutions Plzzz help :/ & thanks in advance :)

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mchinand
      wrote on last edited by
      #2

      Looks like you are mixing Qt versions; 5.4 and 5.2.1. Is the old qmake in you path (type 'which qmake' at the command prompt)?

      S 1 Reply Last reply
      1
      • M mchinand

        Looks like you are mixing Qt versions; 5.4 and 5.2.1. Is the old qmake in you path (type 'which qmake' at the command prompt)?

        S Offline
        S Offline
        ShiniGami
        wrote on last edited by
        #3

        @mchinand QMake version 3.0
        Using Qt version 5.2.1 in /usr/lib/x86_64-linux-gnu

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mchinand
          wrote on last edited by
          #4

          Are you trying to compile the Qt 5.4 MySQL driver with Qt 5.2.1? You shouldn't mix versions.

          S 1 Reply Last reply
          0
          • M mchinand

            Are you trying to compile the Qt 5.4 MySQL driver with Qt 5.2.1? You shouldn't mix versions.

            S Offline
            S Offline
            ShiniGami
            wrote on last edited by
            #5

            @mchinand sorry i didn't see that till you told me
            there is any way how to update my qmake to 5.4 ?

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mchinand
              wrote on last edited by mchinand
              #6

              What do you have in /home/shinigami/Qt/5.4/? Just the source or a full installation (libs and binaries)? If it's a full installation then you already have the qmake that goes with 5.4. Call qmake with the full path: /home/shinigami/Qt/5.4/..../bin/qmake. The middle part of the path (what I have as ....) will be something like the full version number of Qt (e.g., 5.4.1) and the compiler version, I'm not exactly sure what it is for what you have installed.

              S 1 Reply Last reply
              1
              • M mchinand

                What do you have in /home/shinigami/Qt/5.4/? Just the source or a full installation (libs and binaries)? If it's a full installation then you already have the qmake that goes with 5.4. Call qmake with the full path: /home/shinigami/Qt/5.4/..../bin/qmake. The middle part of the path (what I have as ....) will be something like the full version number of Qt (e.g., 5.4.1) and the compiler version, I'm not exactly sure what it is for what you have installed.

                S Offline
                S Offline
                ShiniGami
                wrote on last edited by
                #7

                @mchinand finally its work , you can't imagine how much you help me
                Thank you soooooooooo much :)

                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