I tried solving it by importing the plugin i did that the following way:
Configured with the following code:
configure -release -plugin-sql-mysql -I "C:\MySql\include" -L "C:\MySql\lib"
#include <QtPlugin>
Q_IMPORT_PLUGIN(qsqlmysql)
#include <QtPlugin>
Q_IMPORT_PLUGIN(qsqlmysql)
To copy to clipboard, switch view to plain text mode
To the code
Made the .pro file with:
qmake -project "QT += sql" "QTPLUGIN += qsqlmysql"
And the when i run make i get the following error:
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/Qt/4.3.0/Projects/hello'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o "release\hello.exe" tmp\obj\re
lease_shared\hello.o -L"c:\Qt\4.3.0\lib" -L"c:\Qt\4.3.0\lib" -lmingw32 -lqtmain
-lQtSql4 -lQtGui4 -lQtCore4 -LC:/Qt/4.3.0/plugins/sqldrivers/ -lqsqlmysql4 -LC:
\MySql\lib
tmp\obj\release_shared\hello.o(.text+0x859):hello.cpp: undefined reference to `q
t_plugin_instance_qsqlmysql()'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\hello.exe] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/4.3.0/Projects/hello'
mingw32-make: *** [release] Error 2
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `C:/Qt/4.3.0/Projects/hello'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o "release\hello.exe" tmp\obj\re
lease_shared\hello.o -L"c:\Qt\4.3.0\lib" -L"c:\Qt\4.3.0\lib" -lmingw32 -lqtmain
-lQtSql4 -lQtGui4 -lQtCore4 -LC:/Qt/4.3.0/plugins/sqldrivers/ -lqsqlmysql4 -LC:
\MySql\lib
tmp\obj\release_shared\hello.o(.text+0x859):hello.cpp: undefined reference to `q
t_plugin_instance_qsqlmysql()'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\hello.exe] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/4.3.0/Projects/hello'
mingw32-make: *** [release] Error 2
To copy to clipboard, switch view to plain text mode
Bookmarks