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. Qt already updated to 5.14.1, but why it still uses MSVC 2017 build tools?
Forum Updated to NodeBB v4.3 + New Features

Qt already updated to 5.14.1, but why it still uses MSVC 2017 build tools?

Scheduled Pinned Locked Moved Unsolved General and Desktop
32 Posts 7 Posters 4.9k Views 3 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.
  • J.HilkJ Offline
    J.HilkJ Offline
    J.Hilk
    Moderators
    wrote on last edited by
    #7

    The Qt Framework is big, has lots of features and modules and classes.

    If the new compiler only has marginal changes (like one clang/gcc version to an other) you can rather safely upgrade/support the new version after reading the changelog.

    Microsoft until recently, totally broke binary compatibility with each MSVC release and god only knows what they are currently doing.

    So upgrading / supporting a new MSVC version will require extensive testing and I assume that's simply not yet done/finished.

    I personally already run into Qtmsvc2017 and 2019 incompatibility issues. The Qt support answered me with: Thanks for the report we will look into it, but 2019 is not yet officially supported, we suggest to use 2017.
    And that's what I ended up doing.

    I only used msvc2019 in the first place, because MS makes ist unnecessarily difficult to download older compiler version!😡

    What msvc2019 feature is so important that you have to use that compiler ?

    gives error while compiling,

    what error?


    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


    Q: What's that?
    A: It's blue light.
    Q: What does it do?
    A: It turns blue.

    B 2 Replies Last reply
    4
    • J.HilkJ J.Hilk

      The Qt Framework is big, has lots of features and modules and classes.

      If the new compiler only has marginal changes (like one clang/gcc version to an other) you can rather safely upgrade/support the new version after reading the changelog.

      Microsoft until recently, totally broke binary compatibility with each MSVC release and god only knows what they are currently doing.

      So upgrading / supporting a new MSVC version will require extensive testing and I assume that's simply not yet done/finished.

      I personally already run into Qtmsvc2017 and 2019 incompatibility issues. The Qt support answered me with: Thanks for the report we will look into it, but 2019 is not yet officially supported, we suggest to use 2017.
      And that's what I ended up doing.

      I only used msvc2019 in the first place, because MS makes ist unnecessarily difficult to download older compiler version!😡

      What msvc2019 feature is so important that you have to use that compiler ?

      gives error while compiling,

      what error?

      B Offline
      B Offline
      BAHRAMUDIN ADIL
      wrote on last edited by
      #8

      @J-Hilk Thanks for the explanation. I know it is not an easy job needs a lot of tests, but on the other hand, if you persist to do not support the newer version, then it may cause to lose your users by the time because people they going to use the newer version and leave the older one some of them because of security problem, some of them maybe because of compatibility problem.
      You asked me why I want to use MSVC 2019? It is because I am using some libs which recommended to MSVC 2019. And our team development is based on MSVC 2019.

      1 Reply Last reply
      0
      • J.HilkJ J.Hilk

        The Qt Framework is big, has lots of features and modules and classes.

        If the new compiler only has marginal changes (like one clang/gcc version to an other) you can rather safely upgrade/support the new version after reading the changelog.

        Microsoft until recently, totally broke binary compatibility with each MSVC release and god only knows what they are currently doing.

        So upgrading / supporting a new MSVC version will require extensive testing and I assume that's simply not yet done/finished.

        I personally already run into Qtmsvc2017 and 2019 incompatibility issues. The Qt support answered me with: Thanks for the report we will look into it, but 2019 is not yet officially supported, we suggest to use 2017.
        And that's what I ended up doing.

        I only used msvc2019 in the first place, because MS makes ist unnecessarily difficult to download older compiler version!😡

        What msvc2019 feature is so important that you have to use that compiler ?

        gives error while compiling,

        what error?

        B Offline
        B Offline
        BAHRAMUDIN ADIL
        wrote on last edited by
        #9

        @J-Hilk One problem I am getting while using Qt with MSVC 2019, my code not getting compiled:

        main.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QSqlDatabase::~QSqlDatabase(void)" (__imp_??1QSqlDatabase@@QEAA@XZ) referenced in function main
        

        But same code works well with Qt + MSVC 2017.

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #10

          @BAHRAMUDIN-ADIL said in Qt already updated to 5.14.1, but why it still uses MSVC 2017 build tools?:

          But same code works well with Qt + MSVC 2017.

          I doubt that - I would guess you don't link against the Qt sql library. Please show us your .pro file and/or make sure you're linking against the correct libraries you need.

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

          B 1 Reply Last reply
          2
          • Christian EhrlicherC Christian Ehrlicher

            @BAHRAMUDIN-ADIL said in Qt already updated to 5.14.1, but why it still uses MSVC 2017 build tools?:

            But same code works well with Qt + MSVC 2017.

            I doubt that - I would guess you don't link against the Qt sql library. Please show us your .pro file and/or make sure you're linking against the correct libraries you need.

            B Offline
            B Offline
            BAHRAMUDIN ADIL
            wrote on last edited by
            #11

            @Christian-Ehrlicher It is the .pro file content:

            QT -= gui
            
            CONFIG += c++11 console sql
            CONFIG -= app_bundle
            
            # The following define makes your compiler emit warnings if you use
            # any Qt feature that has been marked deprecated (the exact warnings
            # depend on your compiler). Please consult the documentation of the
            # deprecated API in order to know how to port your code away from it.
            DEFINES += QT_DEPRECATED_WARNINGS
            
            # You can also make your code fail to compile if it uses deprecated APIs.
            # In order to do so, uncomment the following line.
            # You can also select to disable deprecated APIs only up to a certain version of Qt.
            #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
            
            SOURCES += \
                    main.cpp
            
            # Default rules for deployment.
            qnx: target.path = /tmp/$${TARGET}/bin
            else: unix:!android: target.path = /opt/$${TARGET}/bin
            !isEmpty(target.path): INSTALLS += target
            

            I have all the DLL and libs files in the Qt installed location bin/lib folder.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SimonSchroeder
              wrote on last edited by
              #12

              According to the documentation (https://doc.qt.io/qt-5/qsqldatabase.html) you should add

              QT += sql
              

              to your .pro file. This tells the compiler to link with the SQL plugin.

              B 2 Replies Last reply
              2
              • S SimonSchroeder

                According to the documentation (https://doc.qt.io/qt-5/qsqldatabase.html) you should add

                QT += sql
                

                to your .pro file. This tells the compiler to link with the SQL plugin.

                B Offline
                B Offline
                BAHRAMUDIN ADIL
                wrote on last edited by BAHRAMUDIN ADIL
                #13

                @SimonSchroeder Thanks! I will try it.

                SGaistS 1 Reply Last reply
                0
                • B BAHRAMUDIN ADIL

                  @SimonSchroeder Thanks! I will try it.

                  SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by SGaist
                  #14

                  @BAHRAMUDIN-ADIL said in Qt already updated to 5.14.1, but why it still uses MSVC 2017 build tools?:

                  @SimonSchroeder If you see carefully I have already added sql

                  To the wrong variable. You added it to CONFIG but you shall add it to QT as @SimonSchroeder wrote.

                  [edit: Answer to the original post SGaist]

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

                  B 1 Reply Last reply
                  2
                  • S SimonSchroeder

                    According to the documentation (https://doc.qt.io/qt-5/qsqldatabase.html) you should add

                    QT += sql
                    

                    to your .pro file. This tells the compiler to link with the SQL plugin.

                    B Offline
                    B Offline
                    BAHRAMUDIN ADIL
                    wrote on last edited by
                    #15

                    @SimonSchroeder Yes, I did not add the SQL module correctly in .pro file. But now I got this error:

                    QSqlDatabase: QMYSQL driver not loaded
                    QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7
                    
                    J.HilkJ SGaistS 2 Replies Last reply
                    0
                    • SGaistS SGaist

                      @BAHRAMUDIN-ADIL said in Qt already updated to 5.14.1, but why it still uses MSVC 2017 build tools?:

                      @SimonSchroeder If you see carefully I have already added sql

                      To the wrong variable. You added it to CONFIG but you shall add it to QT as @SimonSchroeder wrote.

                      [edit: Answer to the original post SGaist]

                      B Offline
                      B Offline
                      BAHRAMUDIN ADIL
                      wrote on last edited by
                      #16

                      @SGaist Hmmm, yes, it was my fault, but now I got the next error, what is your opinion?
                      I have already added these two DLL files in Qt bin directory:

                      libmysqld.dll
                      libmysql.dll
                      

                      And also I have tried these three as well:

                      ssleay32.dll
                      libeay32.dll
                      libmysql.lib
                      

                      Also not solved the problem.

                      1 Reply Last reply
                      0
                      • B BAHRAMUDIN ADIL

                        @SimonSchroeder Yes, I did not add the SQL module correctly in .pro file. But now I got this error:

                        QSqlDatabase: QMYSQL driver not loaded
                        QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7
                        
                        J.HilkJ Offline
                        J.HilkJ Offline
                        J.Hilk
                        Moderators
                        wrote on last edited by
                        #17

                        @BAHRAMUDIN-ADIL
                        after modifying your pro file, ALWAYS clean and run qmake

                        you added a new module so I would go a step further and delete the build directory for a complete rebuild


                        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                        Q: What's that?
                        A: It's blue light.
                        Q: What does it do?
                        A: It turns blue.

                        B 1 Reply Last reply
                        3
                        • J.HilkJ J.Hilk

                          @BAHRAMUDIN-ADIL
                          after modifying your pro file, ALWAYS clean and run qmake

                          you added a new module so I would go a step further and delete the build directory for a complete rebuild

                          B Offline
                          B Offline
                          BAHRAMUDIN ADIL
                          wrote on last edited by
                          #18

                          @J-Hilk Yes, I did that as you said, but the problem still exists. Can you tell me what files and libs I need to add and add them in which place? Thanks!

                          1 Reply Last reply
                          0
                          • B BAHRAMUDIN ADIL

                            @SimonSchroeder Yes, I did not add the SQL module correctly in .pro file. But now I got this error:

                            QSqlDatabase: QMYSQL driver not loaded
                            QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7
                            
                            SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #19

                            @BAHRAMUDIN-ADIL said in Qt already updated to 5.14.1, but why it still uses MSVC 2017 build tools?:

                            QSqlDatabase: QMYSQL driver not loaded
                            QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7

                            As you can see from the listing, you don't have the plugin at all.

                            As for why: the licensing of MySQL changed so only GPL and Commercial are available now. Since the pre-built binaries are usable also under the LGPL, the plugin can't be provided.

                            You also have the option of building it with MariaDB which fixes the licensing issue.

                            See QTBUG-78241

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

                            B 1 Reply Last reply
                            1
                            • SGaistS SGaist

                              @BAHRAMUDIN-ADIL said in Qt already updated to 5.14.1, but why it still uses MSVC 2017 build tools?:

                              QSqlDatabase: QMYSQL driver not loaded
                              QSqlDatabase: available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7

                              As you can see from the listing, you don't have the plugin at all.

                              As for why: the licensing of MySQL changed so only GPL and Commercial are available now. Since the pre-built binaries are usable also under the LGPL, the plugin can't be provided.

                              You also have the option of building it with MariaDB which fixes the licensing issue.

                              See QTBUG-78241

                              B Offline
                              B Offline
                              BAHRAMUDIN ADIL
                              wrote on last edited by
                              #20

                              @SGaist You mean that I need to build Qt from source with the needed plugins? Or I just need to build the MySQL plugin? If the second case is right, then to build the only plugin, what should I need, and how to build? Is there any guide to show how to build?
                              Thanks!

                              aha_1980A 1 Reply Last reply
                              0
                              • B BAHRAMUDIN ADIL

                                @SGaist You mean that I need to build Qt from source with the needed plugins? Or I just need to build the MySQL plugin? If the second case is right, then to build the only plugin, what should I need, and how to build? Is there any guide to show how to build?
                                Thanks!

                                aha_1980A Offline
                                aha_1980A Offline
                                aha_1980
                                Lifetime Qt Champion
                                wrote on last edited by
                                #21

                                @BAHRAMUDIN-ADIL

                                you need to build the plugin as described here: https://doc.qt.io/qt-5/sql-driver.html#qmysql

                                Regards

                                Qt has to stay free or it will die.

                                B 1 Reply Last reply
                                1
                                • aha_1980A aha_1980

                                  @BAHRAMUDIN-ADIL

                                  you need to build the plugin as described here: https://doc.qt.io/qt-5/sql-driver.html#qmysql

                                  Regards

                                  B Offline
                                  B Offline
                                  BAHRAMUDIN ADIL
                                  wrote on last edited by
                                  #22

                                  @aha_1980 Yes, before you send me the answer I saw this documentation, but can you tell me where is it?

                                  cd %QTDIR%\qtbase\src\plugins\sqldrivers
                                  

                                  I did not find in whole Qt installation directory.

                                  Thank you so much!!!

                                  1 Reply Last reply
                                  0
                                  • Christian EhrlicherC Offline
                                    Christian EhrlicherC Offline
                                    Christian Ehrlicher
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #23

                                    @BAHRAMUDIN-ADIL said in Qt already updated to 5.14.1, but why it still uses MSVC 2017 build tools?:

                                    I did not find in whole Qt installation directory.

                                    As you can see there is 'src' - you need the Qt sources...

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

                                    B 1 Reply Last reply
                                    1
                                    • Christian EhrlicherC Christian Ehrlicher

                                      @BAHRAMUDIN-ADIL said in Qt already updated to 5.14.1, but why it still uses MSVC 2017 build tools?:

                                      I did not find in whole Qt installation directory.

                                      As you can see there is 'src' - you need the Qt sources...

                                      B Offline
                                      B Offline
                                      BAHRAMUDIN ADIL
                                      wrote on last edited by
                                      #24

                                      @Christian-Ehrlicher Hmmm, so for a small plugin I need to download the whole Qt source code? It definitely takes a lot of time and takes much space. I think the Qt team should think about it to make it easy just to download only what I need not all the source code or provide some other way to overcome this problem because MySql users are very a lot on all over the world. If all the users download the source code it will so be extra pressure on Qt side server and also not good user experience.

                                      I hope the Qt becomes more beautiful in the feature!!

                                      aha_1980A 1 Reply Last reply
                                      0
                                      • B BAHRAMUDIN ADIL

                                        @Christian-Ehrlicher Hmmm, so for a small plugin I need to download the whole Qt source code? It definitely takes a lot of time and takes much space. I think the Qt team should think about it to make it easy just to download only what I need not all the source code or provide some other way to overcome this problem because MySql users are very a lot on all over the world. If all the users download the source code it will so be extra pressure on Qt side server and also not good user experience.

                                        I hope the Qt becomes more beautiful in the feature!!

                                        aha_1980A Offline
                                        aha_1980A Offline
                                        aha_1980
                                        Lifetime Qt Champion
                                        wrote on last edited by aha_1980
                                        #25

                                        @BAHRAMUDIN-ADIL You don't need to tell us - we are just users like you and not related to the Qt company.

                                        You might also want to use the MariaDB plugin which does not have the MySQL licence restrictions.

                                        Btw: you can download the sources with the MaintenanceTool.

                                        Regards

                                        Qt has to stay free or it will die.

                                        B 1 Reply Last reply
                                        0
                                        • aha_1980A aha_1980

                                          @BAHRAMUDIN-ADIL You don't need to tell us - we are just users like you and not related to the Qt company.

                                          You might also want to use the MariaDB plugin which does not have the MySQL licence restrictions.

                                          Btw: you can download the sources with the MaintenanceTool.

                                          Regards

                                          B Offline
                                          B Offline
                                          BAHRAMUDIN ADIL
                                          wrote on last edited by
                                          #26

                                          @aha_1980 What is the problem with the following output? I did everything step by step as the document, but why I am getting this error?
                                          Note: I am using MySql 8 and installed successfully and there is no problem with MySql server.

                                          C:\Qt\5.14.1\Src\qtbase\src\plugins\sqldrivers>qmake -- MYSQL_INCDIR="C:/Program Files/MySQL/MySQL Server 8.0/include" MYSQL_LIBDIR="C:/Program Files/MySQL/MySQL Server 8.0/lib"
                                          Info: creating stash file C:\Qt\5.14.1\Src\qtbase\src\plugins\sqldrivers\.qmake.stash
                                          
                                          Running configuration tests...
                                          Checking for DB2 (IBM)... no
                                          Checking for InterBase... no
                                          Checking for MySQL... no
                                          Checking for OCI (Oracle)... no
                                          Checking for ODBC... yes
                                          Checking for PostgreSQL... no
                                          Checking for SQLite (version 2)... no
                                          Checking for TDS (Sybase)... no
                                          Done running configuration tests.
                                          
                                          Configure summary:
                                          
                                          Qt Sql Drivers:
                                            DB2 (IBM) .............................. no
                                            InterBase .............................. no
                                            MySql .................................. no
                                            OCI (Oracle) ........................... no
                                            ODBC ................................... yes
                                            PostgreSQL ............................. no
                                            SQLite2 ................................ no
                                            SQLite ................................. yes
                                              Using system provided SQLite ......... no
                                            TDS (Sybase) ........................... no
                                          
                                          Qt is now configured for building. Just run 'nmake'.
                                          Once everything is built, you must run 'nmake install'.
                                          Qt will be installed into 'C:\Qt\5.14.0\msvc2017_64'.
                                          
                                          Prior to reconfiguration, make sure you remove any leftovers from
                                          the previous build.
                                          
                                          
                                          C:\Qt\5.14.1\Src\qtbase\src\plugins\sqldrivers>nmake sub-mysql
                                          
                                          Microsoft (R) Program Maintenance Utility Version 14.24.28316.0
                                          Copyright (C) Microsoft Corporation.  All rights reserved.
                                          
                                          NMAKE : fatal error U1073: don't know how to make 'sub-mysql'
                                          Stop.
                                          
                                          C:\Qt\5.14.1\Src\qtbase\src\plugins\sqldrivers>
                                          
                                          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