Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. (MySQL) qsqlmysql.dll doesn't get created.
Forum Updated to NodeBB v4.3 + New Features

(MySQL) qsqlmysql.dll doesn't get created.

Scheduled Pinned Locked Moved Solved Installation and Deployment
42 Posts 4 Posters 6.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.
  • S SGaist
    31 Mar 2023, 19:19

    The last line is important: everything happens in ˋc:/build-qt6-sqldrivers`.

    T Offline
    T Offline
    Thelonious
    wrote on 31 Mar 2023, 19:29 last edited by
    #33

    @SGaist
    I'm going reinstall Qt and try again.

    I'll open up a cmd prompt
    C:\mysql
    and then invoke qt-cmake using it's path

    C:\Qt\6.4.3\msvc2019_64\bin\qt-cmake
    

    I'll let you know how it goes. Ninja won't install on my system, give some sort of error regarding Microsoft Store.

    S 1 Reply Last reply 31 Mar 2023, 19:34
    0
    • T Thelonious
      31 Mar 2023, 19:29

      @SGaist
      I'm going reinstall Qt and try again.

      I'll open up a cmd prompt
      C:\mysql
      and then invoke qt-cmake using it's path

      C:\Qt\6.4.3\msvc2019_64\bin\qt-cmake
      

      I'll let you know how it goes. Ninja won't install on my system, give some sort of error regarding Microsoft Store.

      S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 31 Mar 2023, 19:34 last edited by
      #34

      Are you installing it through the Qt installer ?

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

      T 1 Reply Last reply 31 Mar 2023, 19:40
      0
      • S SGaist
        31 Mar 2023, 19:34

        Are you installing it through the Qt installer ?

        T Offline
        T Offline
        Thelonious
        wrote on 31 Mar 2023, 19:40 last edited by Thelonious
        #35

        @SGaist It is bundled with Qt in the C:\Qt\Tools\Ninja\ folder but I can't "install" it. I tried searching for an answer it seems that its blocked by Microsoft Defender or something else in my environment that I can't disable. Do you think the drivers can be built without it?

        BTW, i'm a linux guy at heart and I'm probably going to try to set my Ubuntu environment at home for this.

        S 1 Reply Last reply 31 Mar 2023, 19:56
        0
        • T Thelonious
          31 Mar 2023, 19:40

          @SGaist It is bundled with Qt in the C:\Qt\Tools\Ninja\ folder but I can't "install" it. I tried searching for an answer it seems that its blocked by Microsoft Defender or something else in my environment that I can't disable. Do you think the drivers can be built without it?

          BTW, i'm a linux guy at heart and I'm probably going to try to set my Ubuntu environment at home for this.

          S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 31 Mar 2023, 19:56 last edited by
          #36

          Then there's nothing more you need to do. It should just work (tm). Ninja should be available.

          On Linux you can use your distribution's Qt dev packages. It will be easier.

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

          T 1 Reply Last reply 31 Mar 2023, 20:04
          1
          • S SGaist
            31 Mar 2023, 19:56

            Then there's nothing more you need to do. It should just work (tm). Ninja should be available.

            On Linux you can use your distribution's Qt dev packages. It will be easier.

            T Offline
            T Offline
            Thelonious
            wrote on 31 Mar 2023, 20:04 last edited by
            #37

            @SGaist
            Normally I have to modify the qt-cmake.bat file to direct it to the correct folder for CMake. Should I be modifying that or should I move my CMake installation folder to where its currently represented in the file? Same question for Ninja.

            S 1 Reply Last reply 31 Mar 2023, 20:09
            0
            • T Thelonious
              31 Mar 2023, 20:04

              @SGaist
              Normally I have to modify the qt-cmake.bat file to direct it to the correct folder for CMake. Should I be modifying that or should I move my CMake installation folder to where its currently represented in the file? Same question for Ninja.

              S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 31 Mar 2023, 20:09 last edited by
              #38

              You shouldn't need to do that at all.
              If cmake is not found, you are likely using a terminal not configured properly.

              You can modify the PATH environment variable.

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

              T 2 Replies Last reply 31 Mar 2023, 20:15
              1
              • S SGaist
                31 Mar 2023, 20:09

                You shouldn't need to do that at all.
                If cmake is not found, you are likely using a terminal not configured properly.

                You can modify the PATH environment variable.

                T Offline
                T Offline
                Thelonious
                wrote on 31 Mar 2023, 20:15 last edited by Thelonious
                #39

                BREAKTHROUGH!!!

                explanation incoming

                1 Reply Last reply
                0
                • S SGaist
                  31 Mar 2023, 20:09

                  You shouldn't need to do that at all.
                  If cmake is not found, you are likely using a terminal not configured properly.

                  You can modify the PATH environment variable.

                  T Offline
                  T Offline
                  Thelonious
                  wrote on 31 Mar 2023, 20:34 last edited by Thelonious
                  #40

                  @SGaist

                  Here's what I did and what I got.

                  Before I go any further I'd really like to thank you @SGaist, @Christian-Ehrlicher , @jsulm for your help. I am approaching this as a complete beginner and this is no simple task to understand.

                  After I got by butt out of the QT folder for building I used the Start Menu terminal entry for the platform my app will be in (MSVC2019_64) and navigated to my self-made C:\mysql folder.

                  I was able to build the plugins using

                  qt-cmake C:\Qt\6.4.3\Src\qtbase\src\plugins\sqldrivers -DMySQL_INCLUDE_DIR="C:\Program Files\MySQL\MySQL Connector C 6.1\include" -DMySQL_LIBRARY="C:\Program Files\MySQL\MySQL Connector C 6.1\lib\libmysql.lib"
                  

                  Once the plugins were created I was able to build qsqlmysql.dll and qsqlmysql.pdb by opening the ALL_BUILD.vcxproj in visual studio and building it there (which is what I think @Christian-Ehrlicher was trying to tell me instead of using the command line).

                  I transferred the newly made qsqlmysql.dll and qsqlmysql.pdb to the platform folder of C:\Qt\6.4.3\msvc2019_64\plugins\sqldrivers.

                  I believe I still have to install the drivers but this is obviously the result I've yet to get up to this point.

                  EDIT:

                  Did the same process of opening up INSTALL.vcxproj in Visual Studio and building it there and it was also a success. Now I imagine I just have the right #includes in my project and should be able to connect to MySQL. If it would benefit the community I'd be happy to write up an in depth breakdown of how this is done for my system.

                  1 Reply Last reply
                  0
                  • C Christian Ehrlicher
                    31 Mar 2023, 14:25

                    Either open the generated solution and build the debug version (can also be done from the command line but I don't remember the commands) or use -G Ninja or -G NMake Makefiles for the cmake generator - they both produce rules to create both plugins directly. Maybe we should add this to the documentation. MSBuild is not meant to be run on the command line and therefore has a lot of strange switches...

                    T Offline
                    T Offline
                    Thelonious
                    wrote on 31 Mar 2023, 21:03 last edited by Thelonious
                    #41

                    @Christian-Ehrlicher

                    Where do I find the project that builds the debug version? I have the release qsqlmysql.<dll.pdb> but not qsqlmysqld<dll.pdb>

                    C 1 Reply Last reply 1 Apr 2023, 06:49
                    0
                    • T Thelonious
                      31 Mar 2023, 21:03

                      @Christian-Ehrlicher

                      Where do I find the project that builds the debug version? I have the release qsqlmysql.<dll.pdb> but not qsqlmysqld<dll.pdb>

                      C Online
                      C Online
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on 1 Apr 2023, 06:49 last edited by
                      #42

                      @Thelonious You can change the build type in the msvc IDE.

                      But as I said - use NMake Makefiles or Ninja to create both of them directly on the command line...

                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                      Visit the Qt Academy at https://academy.qt.io/catalog

                      1 Reply Last reply
                      0
                      • T Thelonious has marked this topic as solved on 3 Apr 2023, 12:36

                      42/42

                      1 Apr 2023, 06:49

                      • Login

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