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. I have problems with QMYSQL Driver!
Forum Updated to NodeBB v4.3 + New Features

I have problems with QMYSQL Driver!

Scheduled Pinned Locked Moved General and Desktop
40 Posts 6 Posters 17.7k 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.
  • C Offline
    C Offline
    cincirin
    wrote on last edited by
    #30

    From what I see, you didn't download mysql conector binary builds. Your path is towards xampp/...

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kaloo
      wrote on last edited by
      #31

      I have mysql-connector-c-noinstall-6.0.2-win32, extracted in the xampp/mysql folder

      edit:
      if I put
      @
      INCLUDEPATH += C:/xampp/mysql/include
      LIBS += C:/xampp/mysql/lib/libmysql.a@
      before
      @
      include(../../../sql/drivers/mysql/qsql_mysql.pri)
      include(../qsqldriverbase.pri)
      @
      The output gives me 83 errors with undefined reference

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cincirin
        wrote on last edited by
        #32

        Ok, then your project should look as: ... LIBS += c:/xampp/mysql/lib
        Anyway, I don't have libmysql*.a*

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kaloo
          wrote on last edited by
          #33

          I created the libmysql.a with
          @ reimp C:/xampp/mysql/lib/libmysql.lib @

          1 Reply Last reply
          0
          • C Offline
            C Offline
            cincirin
            wrote on last edited by
            #34

            You have to put only the path to mysql lib directory, because qsql_mysql.pri already do: LIBS += -llibmysql
            Did you try with LIBS += -Lc:/xampp/mysql/lib ?

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kaloo
              wrote on last edited by
              #35

              the mysql.pro is now:
              @
              TARGET = qsqlmysql

              SOURCES = main.cpp

              INCLUDEPATH += C:/xampp/mysql/include
              LIBS += C:/xampp/mysql/lib

              include(../../../sql/drivers/mysql/qsql_mysql.pri)
              include(../qsqldriverbase.pri)
              @

              and the output sais
              @
              C:/xampp/mysql/lib No such file: Permission Denied
              @

              but the folder is not read only... I don`t know what to do...

              1 Reply Last reply
              0
              • C Offline
                C Offline
                cincirin
                wrote on last edited by
                #36

                Your project should be:
                @
                TARGET = qsqlmysql

                SOURCES = main.cpp
                include(../../../sql/drivers/mysql/qsql_mysql.pri)

                include(../qsqldriverbase.pri)

                INCLUDEPATH = C:/xampp/mysql/include
                LIBS += -LC:/xampp/mysql/lib
                @

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kaloo
                  wrote on last edited by
                  #37

                  Yes, now is
                  @
                  TARGET = qsqlmysql

                  SOURCES = main.cpp
                  include(../../../sql/drivers/mysql/qsql_mysql.pri)

                  include(../qsqldriverbase.pri)

                  INCLUDEPATH = C:/xampp/mysql/include
                  LIBS += -LC:/xampp/mysql/lib
                  @
                  but again
                  @
                  cannot find -libmysql
                  @

                  Where should be that file? in the lib folder of mysql?

                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    cincirin
                    wrote on last edited by
                    #38

                    Yes, libmysql .lib lives in mysql lib directory. You don't have to convert it.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      sigrid
                      wrote on last edited by
                      #39

                      In which directory exactly do you try to build the plugin? When looking at your screenshot from below it looks like you try to build it in qtVersion/plugins/sqldrivers/mysql. Is this the case? The directory where you should be building it is not the one in your screenshot, instead you should build it in:

                      qtVersion/src/plugins/sqldrivers/mysql

                      [quote author="kaloo" date="1307298523"]Where I did wrong?
                      !http://img641.imageshack.us/img641/1700/unledvfc.png!

                      I can`t find

                      • libqsqlmysql4.a
                      • libqsqlmysqld4.a
                      • qsqlmysql4.dll
                      • qsqlmysqld4.dll
                        [/quote]
                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        kaloo
                        wrote on last edited by
                        #40

                        sigrid I know that now, but that is one of the old errors. Not I have problems with

                        [quote]
                        Yes, now is
                        @
                        TARGET = qsqlmysql

                        SOURCES = main.cpp
                        include(../../../sql/drivers/mysql/qsql_mysql.pri)

                        include(../qsqldriverbase.pri)

                        INCLUDEPATH = C:/xampp/mysql/include
                        LIBS += -LC:/xampp/mysql/lib
                        @
                        but again
                        @
                        cannot find -libmysql
                        @
                        Where should be that file? in the lib folder of mysql?
                        [/quote]

                        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