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. Creating MySQL plugin for QtCreator, mingw73_64 without full Qt recompile.
QtWS25 Last Chance

Creating MySQL plugin for QtCreator, mingw73_64 without full Qt recompile.

Scheduled Pinned Locked Moved Unsolved General and Desktop
pluginsmysql 64bit
16 Posts 3 Posters 2.6k 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
    SGaist
    Lifetime Qt Champion
    wrote on 3 Feb 2019, 22:51 last edited by
    #6

    If it's working it means that the .dll is compatible so you can just use it. What I meant is that copying .dlls around is the wrong thing to do.

    For one reason: if you change your Qt version and the plugin of that version is built with another incompatible version of MySQL, you are going to have a hard time finding why it doesn't load just because you will likely have forgotten that you copied that .dll there.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    2
    • S Offline
      S Offline
      Silderan
      wrote on 8 Feb 2019, 17:17 last edited by Silderan 2 Aug 2019, 17:17
      #7

      Agree. But...
      What about my original question(s)? XD
      Solving this, I will be closer to compile and won't be worried about .dll version mismatch. ;)

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 8 Feb 2019, 22:45 last edited by
        #8

        Did you run qmake inside the MySQL plugin folder ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Silderan
          wrote on 9 Feb 2019, 16:28 last edited by
          #9

          0_1549725440560_faff53a0-5191-47d3-a29f-523beaa31968-image.png

          0_1549725545070_872f646e-f20f-4e5b-9f8a-2785e7cc7957-image.png

          But, If I'm not wrong, this is because of...:
          0_1549729529972_b3181c5a-95bc-419c-8d6a-283e08b84c97-image.png
          0_1549729557180_a0c0d31a-9630-4948-8891-f1f440b20127-image.png

          Also, found this: https://bugreports.qt.io/browse/QTBUG-62174

          Sadly, this is far beyond my knowledge.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 9 Feb 2019, 22:33 last edited by
            #10

            Since configure failed, did you check the reason of the failure ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            S 1 Reply Last reply 10 Feb 2019, 22:43
            0
            • S Offline
              S Offline
              Silderan
              wrote on 10 Feb 2019, 10:08 last edited by
              #11

              Found this in config.log:

              loaded result for library config.qtbase_sqldrivers.libraries.mysql
              Trying source 0 (type mysqlConfig) of library mysql ...
              mysql_config not found.
                => source produced no result.
              Trying source 1 (type mysqlConfig) of library mysql ...
              mysql_config not found.
                => source produced no result.
              Trying source 2 (type mysqlConfig) of library mysql ...
              mysql_config not found.
                => source produced no result.
              Trying source 3 (type mysqlConfig) of library mysql ...
              mysql_config not found.
                => source produced no result.
              Trying source 4 (type inline) of library mysql ...
                => source failed condition '!config.win32'.
              Trying source 5 (type inline) of library mysql ...
              + cd /d C:\Qt\5.12.0\Src\config.tests\mysql && C:\Qt\5.12.0\Src\qtbase\bin\qmake.exe "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_USE += mysql" "QMAKE_LIBS_MYSQL = -LC:\\mysql/lib -llibmysql" "QMAKE_INCDIR_MYSQL = C:\\mysql/include" C:/Qt/5.12.0/Src/config.tests/mysql
              + cd /d C:\Qt\5.12.0\Src\config.tests\mysql && set MAKEFLAGS=& mingw32-make
              > g++ -c -fno-keep-inline-dllexport -g -w -fexceptions -mthreads -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -I. -IC:\mysql\include -IC:\Qt\5.12.0\Src\qtbase\mkspecs\win32-g++  -o main.o main.cpp
              > main.cpp:5:10: fatal error: mysql.h: No such file or directory
              >  #include <mysql.h>
              >           ^~~~~~~~~
              

              But I wasn't able to figure out nor why cannot find the header (path is correct) neither how to change it (changing MYSQL_PREFIX=C:\mysql makes no diference. As if this is not the correct syntax)
              Furthermore, by executing this three commands out of configure script shows no error:
              0_1549791602319_2e7ad380-4e1b-4a4b-9f9c-639fc47bc023-image.png

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 10 Feb 2019, 20:49 last edited by SGaist 2 Oct 2019, 20:49
                #12

                MYSQL_PREFIX is for Unix like OSes.

                You should also use forward slashes for your paths.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  Silderan
                  wrote on 10 Feb 2019, 21:56 last edited by Silderan 2 Oct 2019, 21:58
                  #13

                  Well then... don't blame me. It's official doc info:

                  0_1549835061467_c0fdb3bc-30f2-4baa-be38-cdbd64a1a628-image.png

                  Furthermore I tried forward slashes, backward slashes, double backward...
                  No change at all :P (Remember what I said... using the same commands out of script, mysql libraries test compiles! Even mixing forward and backward slashes)

                  Anyway, if MYSQL_PREFIX is not for Window. Why it is in official doc and witch one must we use?

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 10 Feb 2019, 22:11 last edited by
                    #14

                    Then please re-read said documentation
                    You have a clear separation with:
                    How to Build the QMYSQL Plugin on Unix and macOS
                    and below you have:
                    How to Build the QMYSQL Plugin on Windows

                    So the technique for each is well separated.

                    And you are mixing the information for the configure script or for building using qmake.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    1
                    • S SGaist
                      9 Feb 2019, 22:33

                      Since configure failed, did you check the reason of the failure ?

                      S Offline
                      S Offline
                      Silderan
                      wrote on 10 Feb 2019, 22:43 last edited by Silderan 2 Oct 2019, 22:45
                      #15

                      Once you said:

                      @SGaist said in Creating MySQL plugin for QtCreator, mingw73_64 without full Qt recompile.:

                      Since configure failed, did you check the reason of the failure ?

                      I figure out that I must run a success configure at first. Sorry for the confusion. My lasts posts were about configure tool, not building the plugins.
                      I'm not able to figure out the reason of the failure. Seems like test code is not able to get the header files, as if the headers don't exists or the include path is wrong. But my "out of the box" tests works.

                      Anyway, I even tried MYSQL_INCDIR and MYSQL_LIBDIR instead of *_PREFIX in configure step. Same result:

                      Sorry again for not been clear enough.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 11 Feb 2019, 07:55 last edited by
                        #16

                        One thing you can try is to use the "-I" and "-L" options of the configure script passing there the paths to your MySQL include and library folder.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0

                        15/16

                        10 Feb 2019, 22:43

                        • Login

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