Qt-interest Archive, April 2007
Database drivers plugins
Message 1 in thread
Hi. I have a problem with an application I have built.
I use sqlite, mysql and odbc plugin in my developer computer.
I have compiled QT with shared libraries (in windows), and it works
EXCELLENT.
When I move the application (exe file + qt dlls + plugins dlls) to a
computer without QT installed, I can run the application, but it seems that
it doesn't find the plugins, or at least, doesn't use them. I list the
database plugins in this way.
QStringList APdrivers = QSqlDatabase::drivers();
and the variable APdrivers is empty.
I've tried copying plugins dlls in ../applicationfolder/plugins and also
setting the path into the program, but I couldn't make it work.
There is any step I've lost?.
I hope you can help me.
Regards,
Joel Prieto
--
[ signature omitted ]
Message 2 in thread
Joel Prieto - Emplast SRL wrote:
[...]
> When I move the application (exe file + qt dlls + plugins dlls) to a
> computer without QT installed, I can run the application, but it seems that
> it doesn't find the plugins, or at least, doesn't use them. I list the
> database plugins in this way.
>
> QStringList APdrivers = QSqlDatabase::drivers();
>
> and the variable APdrivers is empty.
>
> I've tried copying plugins dlls in ../applicationfolder/plugins and also
> setting the path into the program, but I couldn't make it work.
[...]
This thread might help you solve your problem:
http://lists.trolltech.com/qt-interest/2006-09/thread00018-0.html
--
[ signature omitted ]
Message 3 in thread
Hi,
Not a solution for you, but I also am stuck on building the mysql drivers
on windows and running them. Can you please tell me (in exact steps) how
you went about building the MySQL plugins? I am using Mingw compiler on
windows.
Regards,
--
[ signature omitted ]
Message 4 in thread
Hi,
> Not a solution for you, but I also am stuck on building the mysql
> drivers on windows and running them. Can you please tell me (in exact
> steps) how you went about building the MySQL plugins? I am using Mingw
> compiler on windows.
Just follow these instructions:
http://doc.trolltech.com/4.2/sql-driver.html#how-to-build-the-plugin-on-windows
What doesn't work for you?
Since you're using MinGW, you would have to change from:
"LIBS+=C:\MySQL\lib\opt\libmysql.lib"
to something liek this:
"LIBS+=C:\MySQL\lib\opt\libmysql.a"
For using MySQL with MinGW, see for example:
http://www.dvrsol.com/programming.html#mymingw
http://dev.mysql.com/doc/refman/5.0/en/windows-client-compiling.html
http://www.google.com/search?q=MinGW+Mysql
--
[ signature omitted ]
Message 5 in thread
I didn't find the link yet.
The problem is that MySQL lib (the distributed by MYSQL) is for MSVS or
something like this, so when Mingw tries to link(¿?) it finds many undefined
symbos. There is a program distributed with mingw to redesign (i don't know
the word, but that is the idea) some files, so it can process.
then the compilation is direct.
Joel
-----Mensaje original-----
De: Dimitri [mailto:dimitri@xxxxxxxxxxxxx]
Enviado el: miércoles, 11 de abril de 2007 15:18
Para: qt-interest@xxxxxxxxxxxxx
Asunto: Re: Database drivers plugins
Hi,
> Not a solution for you, but I also am stuck on building the mysql
> drivers on windows and running them. Can you please tell me (in exact
> steps) how you went about building the MySQL plugins? I am using Mingw
> compiler on windows.
Just follow these instructions:
http://doc.trolltech.com/4.2/sql-driver.html#how-to-build-the-plugin-on-wind
ows
What doesn't work for you?
Since you're using MinGW, you would have to change from:
"LIBS+=C:\MySQL\lib\opt\libmysql.lib"
to something liek this:
"LIBS+=C:\MySQL\lib\opt\libmysql.a"
For using MySQL with MinGW, see for example:
http://www.dvrsol.com/programming.html#mymingw
http://dev.mysql.com/doc/refman/5.0/en/windows-client-compiling.html
http://www.google.com/search?q=MinGW+Mysql
--
[ signature omitted ]
Message 6 in thread
Hi
I've found the link. I don't know how much do you know about QT, I really
don't know too much, but this is the way I have built the plugin.
I supose you already have MYSQL source.
A) Please follow the steps listed in this page
http://qtnode.net/wiki/Qt4_on_Windows
B) You have to compile QT with Mysql plugin available... below I copy the
configure command to make it available. for MYSQL the important option
s -plugin-sql-mysql
configure -release -shared -no-fast -plugin-sql-mysql -plugin-sql-odbc -pl
ugin-sql-sqlite -qt-gif -qt-libjpeg -qmake -qt-style-windows -qt-style-windo
wsxp -saveconfig
C) Follow the instructions explained in QT Assistant
"How to Build the Plugin on Windows"
" You need to get the MySQL installation files. Run SETUP.EXE and choose
"Custom Install". Install the "Libs & Include Files" Module. Build the
plugin as follows (here it is assumed that MySQL is installed in C:\MySQL):
cd %QTDIR%\src\plugins\sqldrivers\mysql
qmake -o Makefile "INCLUDEPATH+=C:\MySQL\include"
"LIBS+=C:\MySQL\lib\opt\libmysql.lib" mysql.pro
make
"
Let me know if you could build the plugin. The most "diffucult" step for me
was A), because I didn't know what it do
Regards,
Joel
-----Mensaje original-----
De: Anurag Singh Rana [mailto:anurag_rana@xxxxxxxxxxxxxxxxxxx]
Enviado el: miércoles, 11 de abril de 2007 11:45
Para: Joel Prieto - Emplast SRL
CC: qt-interest@xxxxxxxxxxxxx
Asunto: Re: Database drivers plugins
Hi,
Not a solution for you, but I also am stuck on building the mysql drivers
on windows and running them. Can you please tell me (in exact steps) how
you went about building the MySQL plugins? I am using Mingw compiler on
windows.
Regards,
--
[ signature omitted ]