qmysql driver not loaded qt 6.6
-
C:\Qt2\6.6.0\mingw_64>cd C:\Qt2\6.6.0\qtbase-everywhere-src-6.6.0\src\plugins\sqldrivers
C:\Qt2\6.6.0\qtbase-everywhere-src-6.6.0\src\plugins\sqldrivers>call C:\Qt2\6.6.0\mingw_64\bin\qt-cmake -G "MinGW Makefiles" . -DMySQL_INCLUDE_DIR="C:\Program Files\MySQL\MySQL Server 8.0\include" -DMySQL_LIBRARY="C:\Program Files\MySQL\MySQL Server 8.0\lib\libmysql.lib" -DCMAKE_INSTALL_PREFIX="C:\Qt2\6.6.0\mingw_64" -DCMAKE_C_COMPILER="gcc.exe" -DCMAKE_CXX_COMPILER="g++.exe"
-- The CXX compiler identification is GNU 11.2.0
-- The C compiler identification is GNU 11.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Qt2/Tools/mingw1120_64/bin/gcc.exe
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: C:/Qt2/Tools/mingw1120_64/bin/g++.exe
-- Check for working CXX compiler: C:/Qt2/Tools/mingw1120_64/bin/g++.exe - works
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Qt2/Tools/mingw1120_64/bin/gcc.exe
-- Check for working C compiler: C:/Qt2/Tools/mingw1120_64/bin/gcc.exe - works
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
CMake Warning (dev) at C:/Qt2/Tools/CMake_64/share/cmake-3.24/Modules/GNUInstallDirs.cmake:243 (message):
Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
target architecture is known. Please enable at least one language before
including GNUInstallDirs.
Call Stack (most recent call first):
C:/Qt2/6.6.0/mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2563 (include)
C:/Qt2/6.6.0/mingw_64/lib/cmake/Qt6Core/Qt6CoreConfigExtras.cmake:38 (_qt_internal_setup_deploy_support)
C:/Qt2/6.6.0/mingw_64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:122 (include)
C:/Qt2/6.6.0/mingw_64/lib/cmake/Qt6/Qt6Config.cmake:156 (find_package)
CMakeLists.txt:13 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.-- Configuration summary shown below. It has also been written to C:/Qt2/6.6.0/qtbase-everywhere-src-6.6.0/src/plugins/sqldrivers/config.summary
-- Configure with --log-level=STATUS or higher to increase CMake's message verbosity. The log level does not persist across reconfigurations.-- Configure summary:
Qt Sql Drivers:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. yes
OCI (Oracle) ........................... no
ODBC ................................... yes
PostgreSQL ............................. no
SQLite ................................. yes
Using system provided SQLite ......... no
Mimer .................................. no-- Configuring done
-- Generating done
-- Build files have been written to: C:/Qt2/6.6.0/qtbase-everywhere-src-6.6.0/src/plugins/sqldriversC:\Qt2\6.6.0\qtbase-everywhere-src-6.6.0\src\plugins\sqldrivers>mingw32-make
[ 4%] Generating version linker script for target QMYSQLDriverPlugin
process_begin: CreateProcess(C:\Users\sadfi\AppData\Local\Temp\make9964-1.bat, C:\Users\sadfi\AppData\Local\Temp\make9964-1.bat, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make[2]: *** [mysql\CMakeFiles\QMYSQLDriverPlugin_version_script.dir\build.make:72: mysql/QMYSQLDriverPlugin.version] Error 2
mingw32-make[1]: *** [CMakeFiles\Makefile2:224: mysql/CMakeFiles/QMYSQLDriverPlugin_version_script.dir/all] Error 2
mingw32-make: *** [Makefile:145: all] Error 2i don t know the cause of this issue can anyone help me plz ?
-
C:\Qt2\6.6.0\mingw_64>cd C:\Qt2\6.6.0\qtbase-everywhere-src-6.6.0\src\plugins\sqldrivers
C:\Qt2\6.6.0\qtbase-everywhere-src-6.6.0\src\plugins\sqldrivers>call C:\Qt2\6.6.0\mingw_64\bin\qt-cmake -G "MinGW Makefiles" . -DMySQL_INCLUDE_DIR="C:\Program Files\MySQL\MySQL Server 8.0\include" -DMySQL_LIBRARY="C:\Program Files\MySQL\MySQL Server 8.0\lib\libmysql.lib" -DCMAKE_INSTALL_PREFIX="C:\Qt2\6.6.0\mingw_64" -DCMAKE_C_COMPILER="gcc.exe" -DCMAKE_CXX_COMPILER="g++.exe"
-- The CXX compiler identification is GNU 11.2.0
-- The C compiler identification is GNU 11.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Qt2/Tools/mingw1120_64/bin/gcc.exe
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: C:/Qt2/Tools/mingw1120_64/bin/g++.exe
-- Check for working CXX compiler: C:/Qt2/Tools/mingw1120_64/bin/g++.exe - works
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Qt2/Tools/mingw1120_64/bin/gcc.exe
-- Check for working C compiler: C:/Qt2/Tools/mingw1120_64/bin/gcc.exe - works
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
CMake Warning (dev) at C:/Qt2/Tools/CMake_64/share/cmake-3.24/Modules/GNUInstallDirs.cmake:243 (message):
Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
target architecture is known. Please enable at least one language before
including GNUInstallDirs.
Call Stack (most recent call first):
C:/Qt2/6.6.0/mingw_64/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:2563 (include)
C:/Qt2/6.6.0/mingw_64/lib/cmake/Qt6Core/Qt6CoreConfigExtras.cmake:38 (_qt_internal_setup_deploy_support)
C:/Qt2/6.6.0/mingw_64/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:122 (include)
C:/Qt2/6.6.0/mingw_64/lib/cmake/Qt6/Qt6Config.cmake:156 (find_package)
CMakeLists.txt:13 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.-- Configuration summary shown below. It has also been written to C:/Qt2/6.6.0/qtbase-everywhere-src-6.6.0/src/plugins/sqldrivers/config.summary
-- Configure with --log-level=STATUS or higher to increase CMake's message verbosity. The log level does not persist across reconfigurations.-- Configure summary:
Qt Sql Drivers:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. yes
OCI (Oracle) ........................... no
ODBC ................................... yes
PostgreSQL ............................. no
SQLite ................................. yes
Using system provided SQLite ......... no
Mimer .................................. no-- Configuring done
-- Generating done
-- Build files have been written to: C:/Qt2/6.6.0/qtbase-everywhere-src-6.6.0/src/plugins/sqldriversC:\Qt2\6.6.0\qtbase-everywhere-src-6.6.0\src\plugins\sqldrivers>mingw32-make
[ 4%] Generating version linker script for target QMYSQLDriverPlugin
process_begin: CreateProcess(C:\Users\sadfi\AppData\Local\Temp\make9964-1.bat, C:\Users\sadfi\AppData\Local\Temp\make9964-1.bat, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make[2]: *** [mysql\CMakeFiles\QMYSQLDriverPlugin_version_script.dir\build.make:72: mysql/QMYSQLDriverPlugin.version] Error 2
mingw32-make[1]: *** [CMakeFiles\Makefile2:224: mysql/CMakeFiles/QMYSQLDriverPlugin_version_script.dir/all] Error 2
mingw32-make: *** [Makefile:145: all] Error 2i don t know the cause of this issue can anyone help me plz ?
I would try to use a mysql path without spaces.
-
I would try to use a mysql path without spaces.
@Christian-Ehrlicher Actually the problem is when I use the command minwg32-make
here is what I get :
C:\Qt2\6.6.0\qtbase-everywhere-src-6.6.0\src\plugins\sqldrivers>mingw32-make
[ 4%] Generating version linker script for target QMYSQLDriverPlugin
process_begin: CreateProcess(C:\Users\sadfi\AppData\Local\Temp\make9964-1.bat, C:\Users\sadfi\AppData\Local\Temp\make9964-1.bat, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make[2]: *** [mysql\CMakeFiles\QMYSQLDriverPlugin_version_script.dir\build.make:72: mysql/QMYSQLDriverPlugin.version] Error 2
mingw32-make[1]: *** [CMakeFiles\Makefile2:224: mysql/CMakeFiles/QMYSQLDriverPlugin_version_script.dir/all] Error 2
mingw32-make: *** [Makefile:145: all] Error 2 -
@Christian-Ehrlicher Actually the problem is when I use the command minwg32-make
here is what I get :
C:\Qt2\6.6.0\qtbase-everywhere-src-6.6.0\src\plugins\sqldrivers>mingw32-make
[ 4%] Generating version linker script for target QMYSQLDriverPlugin
process_begin: CreateProcess(C:\Users\sadfi\AppData\Local\Temp\make9964-1.bat, C:\Users\sadfi\AppData\Local\Temp\make9964-1.bat, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make[2]: *** [mysql\CMakeFiles\QMYSQLDriverPlugin_version_script.dir\build.make:72: mysql/QMYSQLDriverPlugin.version] Error 2
mingw32-make[1]: *** [CMakeFiles\Makefile2:224: mysql/CMakeFiles/QMYSQLDriverPlugin_version_script.dir/all] Error 2
mingw32-make: *** [Makefile:145: all] Error 2I know - the only idea I've is that the generated makefiles have some problems because of the spaces in the path.
-
I know - the only idea I've is that the generated makefiles have some problems because of the spaces in the path.
@Christian-Ehrlicher i don t think so :/, i ve followed this vd step by step he has the same paths as me with spaces and it works for him
https://www.youtube.com/watch?v=7YIJUL9pz2U&ab_channel=QtWithKetan -
FIXED: just go to this web site (https://github.com/thecodemonkey86/qt_mysql_driver/releases)
and try to download the build drivers wich are ready and put them at the same folder of your project.
Big thanks to owner of that git .