Solved error while connection to Database
-
ok now i run all the process from this http://doc.qt.io/qt-5/windows-building.html website.
Everything seems ok, but still i get the error:
ERROR: Feature 'sql-mysql' was enabled, but the pre-condition 'libs.mysql' failed.
maybe some help`? -
So i tried new things:
i do all the things in the win cmd. it propably worked all well, till the end:
configure -debug -nomake examples -opensource #done
make #done
make install #done
cd C:\mysql\MySQL\MySQLConnector.C6.1\lib #done
reimp -d libmysql.lib #done
dlltool -k -d libmysql.def -l libmysql.a #done
cd C:\qt\5.9.1\Src #done
configure -I C:\mysql\MySQL\MySQLConnector.C6.1\include -L C:\mysql\MySQL\MySQLConnector.C6.1\lib #done
make sub-src #done
make install #done
cd C:\qt\5.9.1\Src\qtbase\src\plugins\sqldrivers\mysql
qmake "INCLUDEPATH+=C:\mysql\MySQL\MySQLConnector.C6.1\include" "LIBS+=-L. mysql" mysql.pro
makethe make statement gives me the following error:
ql_mysql_p.o -LC:\utils\my_sql\my_sql\lib -LC:\utils\postgresql\pgsql\lib -L. mysql -LC:\qt\5.9.1\Src\qtbase\lib C:\qt\5.9.1\Src\qtbase\lib\libQt5Sql.a C:\qt\5.9.1\Src\qtbase\lib\libQt5Core.a .obj\release\qsqlmysql_resource_res.o
g++: error: mysql: No such file or directory
Makefile.Release:67: recipe for target 'C:\qt\5.9.1\Src\qtbase\plugins\sqldrivers\qsqlmysql.dll' failed
make[1]: *** [C:\qt\5.9.1\Src\qtbase\plugins\sqldrivers\qsqlmysql.dll] Error 1
make[1]: Leaving directory 'C:/qt/5.9.1/Src/qtbase/src/plugins/sqldrivers/mysql'
Makefile:40: recipe for target 'release-all' failedi have also find in the qt4.9 description additional these steps after my end:
Now the following libraries are ready in C:\Qt\4.6.2\plugins\sqldrivers.
libqsqlmysql4.a libqsqlmysqld4.a qsqlmysql4.dll qsqlmysqld4.dll
ok i dont have the 4 at the end of the filename but i find the qsqlmysqld but not the qsqlmysql.dll , it seems that this file will not creat. But why?
-
so i try to install qt 5.9.2 new .
have someone a step-by-step installation guide from a new installation to a working mysql plugin ? -
Now the following libraries are ready in C:\Qt\4.6.2\plugins\sqldrivers.
Sorry, you seem to be saying either you have Qt4 SQL drivers for your Qt5 build, or you have Qt5 drivers but you've placed them in a directory named for Qt4 which I would guess is not looked at by Qt5??
-
yes in my frustration i tried the installation guide How to Build the QMYSQL Plugin on Windows from the qt 4.9 part. i now that i use 5.9.1 but the 5.9 installation guide seems not to be working... so i tried the other guide and only change the 4.9 path to 5.9
-
@Allerknappe said in error while connection to Database:
and only change the 4.9 path to 5.9
Earlier you wrote:
Now the following libraries are ready in C:\Qt\4.6.2\plugins\sqldrivers
I leave you to verify your paths and that they are being searched correctly for 5.9.
-
yeah sorry for the mistake i copied from a other side where the path was for 4.9 , for me i changed the path to 5.9
-
ok, how i solve this problem :
C:\qt\5.9.2\Src\qtlocation\src\3rdparty\mapbox-gl-native/src/mbgl/gl/value.cpp:185: undefined reference to
glBlendEquation@4' C:\qt\5.9.2\Src\qtlocation\lib\libqmapboxgld.a(value.o): In function
ZN4mbgl2gl5value10BlendColor3SetERKNS_5ColorE':
C:\qt\5.9.2\Src\qtlocation\src\3rdparty\mapbox-gl-native/src/mbgl/gl/value.cpp:212: undefined reference toglBlendColor@16' C:\qt\5.9.2\Src\qtlocation\lib\libqmapboxgld.a(value.o): In function
ZN4mbgl2gl5value7Program3SetERKj':
C:\qt\5.9.2\Src\qtlocation\src\3rdparty\mapbox-gl-native/src/mbgl/gl/value.cpp:224: undefined reference toglUseProgram@4' C:\qt\5.9.2\Src\qtlocation\lib\libqmapboxgld.a(value.o): In function
ZN4mbgl2gl5value13ActiveTexture3SetERKh':
C:\qt\5.9.2\Src\qtlocation\src\3rdparty\mapbox-gl-native/src/mbgl/gl/value.cpp:248: undefined reference toglActiveTexture@4' C:\qt\5.9.2\Src\qtlocation\lib\libqmapboxgld.a(value.o): In function
ZN4mbgl2gl5value15BindFramebuffer3SetERKj':
C:\qt\5.9.2\Src\qtlocation\src\3rdparty\mapbox-gl-native/src/mbgl/gl/value.cpp:285: undefined reference to `glBindFramebuffer@8' -
so if i try qmake "INCLUDEPATH+=C:/mysql/MySQL/MySQLConnector.C6.1/include" "LIBS+=C:/mysql/MySQL/MySQLConnector.C6.1/lib/libmysql.lib" mysql.pro
i only get the error Project ERROR: Library 'mysql' is not defined.
in the stash file is insert:QMAKE_CXX.INCDIRS =
C:/qt/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include
C:/qt/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0/include-fixed
C:/qt/Tools/mingw530_32/i686-w64-mingw32/include
C:/qt/Tools/mingw530_32/i686-w64-mingw32/include/c++
C:/qt/Tools/mingw530_32/i686-w64-mingw32/include/c++/i686-w64-mingw32
C:/qt/Tools/mingw530_32/i686-w64-mingw32/include/c++/backward
QMAKE_CXX.LIBDIRS =
C:/qt/Tools/mingw530_32/lib/gcc/i686-w64-mingw32/5.3.0
C:/qt/Tools/mingw530_32/lib/gcc
C:/qt/Tools/mingw530_32/i686-w64-mingw32/lib
C:/qt/Tools/mingw530_32/lib
QMAKE_CXX.QT_COMPILER_STDCXX = 199711L
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 5
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
QMAKE_CXX.COMPILER_MACROS =
QT_COMPILER_STDCXX
QMAKE_GCC_MAJOR_VERSION
QMAKE_GCC_MINOR_VERSION
QMAKE_GCC_PATCH_VERSIONsometimes this hole errors are a little mysterious for me...
-
ok i have a solution for my problem:
in an other forum i read that mysql and the description how to build the plugin only work till qt version 5.7 .
so i tried it with 5.7 and now it works! maybe there is a solution for higher versions, but for me it is enough