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.8k 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.
  • SGaistS SGaist

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

    T Offline
    T Offline
    Thelonious
    wrote on 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.

    SGaistS 1 Reply Last reply
    0
    • T Thelonious

      @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.

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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
      0
      • SGaistS SGaist

        Are you installing it through the Qt installer ?

        T Offline
        T Offline
        Thelonious
        wrote on 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.

        SGaistS 1 Reply Last reply
        0
        • T Thelonious

          @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.

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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
          1
          • SGaistS SGaist

            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 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.

            SGaistS 1 Reply Last reply
            0
            • T Thelonious

              @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.

              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on 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
              1
              • SGaistS SGaist

                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 last edited by Thelonious
                #39

                BREAKTHROUGH!!!

                explanation incoming

                1 Reply Last reply
                0
                • SGaistS SGaist

                  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 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
                  • Christian EhrlicherC Christian Ehrlicher

                    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 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>

                    Christian EhrlicherC 1 Reply Last reply
                    0
                    • T Thelonious

                      @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>

                      Christian EhrlicherC Offline
                      Christian EhrlicherC Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on 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

                      • Login

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