Qt-interest Archive, May 2007
qt4 win opensource mysql plugin
Message 1 in thread
Hi,
today i installed qt4.2.2+mingw on a windows xp prof sp2
computer.Installation looks good, i can create and build small test apps.
Next i built the mysql plugin. Everything was OK, libqsqlmysql.a and
qsqlmysql.dll were placed in C:\Qt\4.2.3\plugins\sqldrivers directory.
Than i started the sql browser example app to check whether the plugin
was available - but it was not :(
Any idea why?
windows xp prof sp2, qt4.2.3, mingw 3.4.2, mysql 5.0.41
--
[ signature omitted ]
Message 2 in thread
Possibly some options were different when you built the plugins.
Make sure you use the same options as when building qt.
Cheers,
Peter
> today i installed qt4.2.2+mingw on a windows xp prof sp2
> computer.Installation looks good, i can create and build small test
apps.
> Next i built the mysql plugin. Everything was OK, libqsqlmysql.a and
> qsqlmysql.dll were placed in C:\Qt\4.2.3\plugins\sqldrivers directory.
> Than i started the sql browser example app to check whether the plugin
> was available - but it was not :(
>
> Any idea why?
>
> windows xp prof sp2, qt4.2.3, mingw 3.4.2, mysql 5.0.41
--
[ signature omitted ]
Message 3 in thread
Hello, Veliczky Rudolf
25.05.2007 0:34 you wrote:
> Hi,
>
> today i installed qt4.2.2+mingw on a windows xp prof sp2
> computer.Installation looks good, i can create and build small test apps.
> Next i built the mysql plugin. Everything was OK, libqsqlmysql.a and
> qsqlmysql.dll were placed in C:\Qt\4.2.3\plugins\sqldrivers directory.
> Than i started the sql browser example app to check whether the plugin
> was available - but it was not :(
>
> Any idea why?
>
delete registry key
HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults
--
[ signature omitted ]
Message 4 in thread
Nikolay Moskvichev Ãrta:
> Hello, Veliczky Rudolf
> 25.05.2007 0:34 you wrote:
>> Hi,
>>
>> today i installed qt4.2.2+mingw on a windows xp prof sp2
>> computer.Installation looks good, i can create and build small test apps.
>> Next i built the mysql plugin. Everything was OK, libqsqlmysql.a and
>> qsqlmysql.dll were placed in C:\Qt\4.2.3\plugins\sqldrivers directory.
>> Than i started the sql browser example app to check whether the plugin
>> was available - but it was not :(
>>
>> Any idea why?
>>
> delete registry key
>
> HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
Hi Nikolay,
Since my firt post i tried all sorts of things. I deleted the reg keys,
reinstalled qt (4.2.2 and then 4.2.3), mingw, mysql, etc. Next i removed
everything cleaned the registry and installed them one by one, then
built the plugin again... everything looks good but qt doesn't load
mysql driver :(
And because i must finish with those classes and currently that is the
only available pc i replaced xp with linux, built qt, mysql and now
everything work fine :) Additionally i can use my favourite editor (kate).
Thanks
--
[ signature omitted ]
Message 5 in thread
Hello, Veliczky Rudolf
28.05.2007 13:35 you wrote:
>
> Since my firt post i tried all sorts of things. I deleted the reg keys,
> reinstalled qt (4.2.2 and then 4.2.3), mingw, mysql, etc. Next i removed
> everything cleaned the registry and installed them one by one, then
> built the plugin again... everything looks good but qt doesn't load
> mysql driver :(
Sorry, i know only two typical troubles here - plugin dll dependencies,
like missed path to mysql client dll, (depends is your friend here ) and
registry cache.
> And because i must finish with those classes and currently that is the
> only available pc i replaced xp with linux, built qt, mysql and now
> everything work fine :) Additionally i can use my favourite editor (kate).
>
--
[ signature omitted ]
Message 6 in thread
Hi,
> today i installed qt4.2.2+mingw on a windows xp prof sp2
> computer.Installation looks good, i can create and build small test apps.
> Next i built the mysql plugin. Everything was OK, libqsqlmysql.a and
> qsqlmysql.dll were placed in C:\Qt\4.2.3\plugins\sqldrivers directory.
How did you build the MySQL plugin?
Where did you get MySQL from? Is there a MySQL DLL somewhere on your system?
Is this DLL in your PATH?
--
[ signature omitted ]
Message 7 in thread
Dimitri Ãrta:
> Hi,
>
>> today i installed qt4.2.2+mingw on a windows xp prof sp2
>> computer.Installation looks good, i can create and build small test apps.
>> Next i built the mysql plugin. Everything was OK, libqsqlmysql.a and
>> qsqlmysql.dll were placed in C:\Qt\4.2.3\plugins\sqldrivers directory.
>
> How did you build the MySQL plugin?
>
> Where did you get MySQL from? Is there a MySQL DLL somewhere on your
> system? Is this DLL in your PATH?
>
> --
> Dimitri
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
Hi Dimitri,
MySQL windows setup is from mysql.org's download section.
The way i built my system is the following:
1. mysql install (full with devel of course), configure, load the
database, add mysql dirs to PATH then run a few queries to check whether
everything is fine or not.
2.qt+mingw install, set PATH, install mingw-utils. Minimal qt test
program - compiled OK.
3. mysql plugin build the "Bert Wizzy" way
*************************************************************************
# cd c:\mysql\lib\opt (c:\mysql is where our MySQL is installed)
# reimp -d libmysql.lib (reimp comes with MinGW utilities)
# dlltool -k --input-def libmysql.def --dllname libmysql.dll
--output-lib libmysql.a
Now we have the MinGW compatible library called libmysql.a
2) Building the QMYSQL plugin dll.
- - - - - - - - - - - - - - - - - -
Now we can build the Qt MySQL plugin based on the above MinGW compatible
library. This can be done by taking the following steps:
# cd c:\qt\src\plugins\sqldrivers\mysql (c:\qt is where qt is installed)
# qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE"
"LIBS+=-LC:\MYSQL\LIB\OPT -lmysql" mysql.pro
# make (will build and install the plugin)
*************************************************************************
4. Start SQL Browser examle to check mysql plugin availability - and
that failed :(
It is really strange, as i mentioned earlier this solution works both on
myd office pc and my laptop.
All apps. are installed directly to C: (C:\mysql;c:\mingw;c:\qt\4.2.3)
Registry status:
[HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults\Qt Factory
Cache
4.2\com.trolltech.Qt.QSqlDriverFactoryInterface:\C:\Qt\4.2.3\plugins\sqldrivers]
qsqlmysql.dll is missing from here. ODBC and SQLITE are present.
And
[HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults\Qt Plugin
Cache 4.2.false\C:\Qt\4.2.3\plugins\sqldrivers]
qsqlmysql.dll has a value like this : 0 1 unknown 2007-05-26T19:10:27
instead of something like this:
40203 0 Windows mingw release full-config 2007-05-25T12:13:16
Rudolf
--
[ signature omitted ]
Message 8 in thread
Hi,
> MySQL windows setup is from mysql.org's download section.
> The way i built my system is the following:
>
> 1. mysql install (full with devel of course), configure, load the
> database, add mysql dirs to PATH then run a few queries to check whether
> everything is fine or not.
> 2.qt+mingw install, set PATH, install mingw-utils. Minimal qt test
> program - compiled OK.
> 3. mysql plugin build the "Bert Wizzy" way
> *************************************************************************
> # cd c:\mysql\lib\opt (c:\mysql is where our MySQL is installed)
> # reimp -d libmysql.lib (reimp comes with MinGW utilities)
> # dlltool -k --input-def libmysql.def --dllname libmysql.dll
> --output-lib libmysql.a
> Now we have the MinGW compatible library called libmysql.a
That looks good.
> 2) Building the QMYSQL plugin dll.
> - - - - - - - - - - - - - - - - - -
> Now we can build the Qt MySQL plugin based on the above MinGW compatible
> library. This can be done by taking the following steps:
> # cd c:\qt\src\plugins\sqldrivers\mysql (c:\qt is where qt is installed)
> # qmake -o Makefile "INCLUDEPATH+=C:\MYSQL\INCLUDE"
> "LIBS+=-LC:\MYSQL\LIB\OPT -lmysql" mysql.pro
> # make (will build and install the plugin)
> *************************************************************************
>
> 4. Start SQL Browser examle to check mysql plugin availability - and
> that failed :(
Are you certain the MySQL DLL is in your PATH? Where is it and what is the
value of PATH? Have you run DependencyWalker on Qt's MySQL plugin?
http://www.dependencywalker.com/
--
[ signature omitted ]
Message 9 in thread
I have found very usefull to add some printf(...) to bool
QLibraryPrivate::load_sys() function (qlibrary_win.cpp) in such situations.
fanda
On Thu, 24 May 2007 20:34:28 +0200, Veliczky Rudolf
<veliczky.rudolf@xxxxxxxxx> wrote:
> Hi,
>
> today i installed qt4.2.2+mingw on a windows xp prof sp2
> computer.Installation looks good, i can create and build small test apps.
> Next i built the mysql plugin. Everything was OK, libqsqlmysql.a and
> qsqlmysql.dll were placed in C:\Qt\4.2.3\plugins\sqldrivers directory.
> Than i started the sql browser example app to check whether the plugin
> was available - but it was not :(
>
> Any idea why?
>
> windows xp prof sp2, qt4.2.3, mingw 3.4.2, mysql 5.0.41
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]