http://www.qtcentre.org/forum/faq.ph...lugin_category
[wiki]Building the QMYSQL plugin on Windows using MinGW[/wiki]
http://www.qtcentre.org/forum/faq.ph...lugin_category
[wiki]Building the QMYSQL plugin on Windows using MinGW[/wiki]
I have no idea why keep getting the "undefined reference " such as following:
the last thing i tried was calling mingw32-make after following instructions at "MinGW tips"Qt Code:
C:/Qt/4.4.3/src/corelib/plugin/quuid.cpp:566: undefined reference to `CoCreateGu id@4' ./tmp\obj\debug_shared\qeventdispatcher_win.o(.text+0x2ac5): In function `ZN28QE ventDispatcherWin32Private16doWsaAsyncSelectEi': C:/Qt/4.4.3/src/corelib/kernel/qeventdispatcher_win.cpp:619: undefined reference to `WSAAsyncSelect@16'To copy to clipboard, switch view to plain text mode
section of:
http://wiki.qtcentre.org/index.php?t...ws_using_MinGW
i'm stuck!![]()
What exactly step by step did you do? Please include details such as names of archives you downloaded and info about your environment.
sepehr (11th December 2008)
i installed mysql in c:\mysql,
include files are installed and are located in C:\MYSQL\include
lib files are in C:\MYSQL\lib\opt
i didn't have reimp utility so i downloaded it from sourceforge and put it in bin directory of mingw(later i put it in qt bin directory too)
then I did
then cd into C:\Qt\4.4.3\src\plugins\sqldrivers\mysql and then i rundos Code:
cd C:\MYSQL\lib\opt reimp libmysql.libTo copy to clipboard, switch view to plain text mode
and while i'm in C:\Qt\4.4.3\src\plugins\sqldrivers\mysql directory i run make commanddos Code:
qmake -o Makefile "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MySQL\lib\opt\liblibmysql.a" mysql.proTo copy to clipboard, switch view to plain text mode
some stuff go well at first but i get these undefined reference erros
what could be wrong?couldn't this be a version conflict of mingw,qt or mysql?Qt Code:
tmp/obj/debug_shared/moc_qsql_mysql.o(.rdata$_ZTV12QMYSQLDriver[vtable for QMYSQ LDriver]+0x7c):c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4To copy to clipboard, switch view to plain text mode
i have to get mysql driver running,what else can i do? any other solutions?
--
thanks again
Last edited by wysota; 2nd January 2009 at 23:18.
I would try running configure with options to enable mysql support and then cd into the directory containing the plugin and run make there. There might have been some changes in Qt that modified the way plugins are build and those instructions might be wrong.
are you sure that this file name is correct 'liblibmysql.a'? maybe 'libmysql.a'?
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
It really should be libmysql.a...
there was just a versioning issue and the problem got fixed by upgrading mysql server and I could make those mysql drivers DLLs ,now is there anything other than DLL files that I should ship ? because I get the same error on other machines trying to execute my program despite of having the DLLs
You should ship the Qt MySQL driver (qmysql.dll) and MySQL client library (mysqlclient.dll or mysql.dll or something like that). The driver has to be placed in the sqldrivers subdirectory of your application's installation directory and MySQL library either in the installation directory or in a system directory (like C:\Windows\System32).
sepehr (11th January 2009)
from QT docs
it was not mentioned that sql drivers DLL files should be put in a subdirectory called sqldrivers within plugins directory,thanks wysotaPlugins work differently to normal DLLs, so we can't just copy them into the same directory as our application's executable as we did with the Qt DLLs. When looking for plugins, the application searches in a plugins subdirectory inside the directory of the application executable.
So to make the plugins available to our application, we have to create the plugins subdirectory and copy over the relevant DLLs:
plugins\pnp_basictools.dll
plugins\pnp_extrafilters.dll
Bookmarks