[Qt-interest] 答复: 答复: 答复: plugins directory
pengliang(彭亮)
pengliang at founder.com
Thu Dec 23 09:42:46 CET 2010
Hi
I am sure I have installed the mysql client library.
Untitled2 has compiled on Qt-4.7.1. Please see the source code in attached file.
when I rename /usr/local/Trolltech/Qt-4.7.1 to Qt-4.7.11111 ,it can not work.
[incam at incam04 ~]$ cd /gerfile/ken/test/
[incam at incam04 test]$ ls
accessible bearer codecs designer graphicssystems iconengines imageformats inputmethods lib plugins script sqldrivers untitled2
[incam at incam04 test]$ ./untitled2
"/gen_db/gerfile/ken/test/lib"
"/gen_db/gerfile/ken/test/plugins"
"/usr/local/Trolltech/Qt-4.5.3/plugins"
"/gen_db/gerfile/ken/test"
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE
false open
[incam at incam04 test]$ cd plugins
[incam at incam04 plugins]$ ls
accessible bearer codecs designer graphicssystems iconengines imageformats inputmethods sqldrivers
[incam at incam04 plugins]$ cd sqldrivers/
[incam at incam04 sqldrivers]$ ls
libqsqlite.so libqsqlmysql.so <--- library exist.
[incam at incam04 sqldrivers]$
When I rename /usr/local/Trolltech/Qt-4.7.11111 to Qt-4.7.1 , it’s ok!!
[incam at incam04 ~]$ cd /gerfile/ken/test/
[incam at incam04 test]$ ls
abc codecs iconengines lib script
accessible designer imageformats main.cpp sqldrivers
bearer graphicssystems inputmethods plugins untitled2
[incam at incam04 test]$ ./untitled2
"/gen_db/gerfile/ken/test/lib"
"/gen_db/gerfile/ken/test/plugins"
"/usr/local/Trolltech/Qt-4.7.1/plugins"
"/gen_db/gerfile/ken/test"
[incam at incam04 test]$
Does the program only search the libraries in "/usr/local/Trolltech/Qt-4.7.1/plugins"?
Thanks
彭亮 Ken
-----邮件原件-----
发件人: qt-interest-bounces+pengliang=founder.com at qt.nokia.com [mailto:qt-interest-bounces+pengliang=founder.com at qt.nokia.com] 代表 Samuel Gaist
发送时间: 2010年12月20日 16:33
收件人: qt-interest at qt.nokia.com
主题: Re: [Qt-interest] 答复: 答复: plugins directory
On 18 déc. 2010, at 01:49, pengliang(彭亮) wrote:
> Hi
> I done like you said. And I have read qt-assistant, it says same as yours.
> But, it still can not work. “QSqlDatabase: QMYSQL driver not loaded . QSqlDatabase: available drivers: QSQLITE.
> But I add the app_path into LD_LIBRARY_PATH. It is ok.
>
>
> Thanks
> 彭亮 Ken
>
>
> 发件人: qt-interest-bounces+pengliang=founder.com at qt.nokia.com [mailto:qt-interest-bounces+pengliang=founder.com at qt.nokia.com] 代表 Joseph Caputo
> 发送时间: 2010年12月16日 21:23
> 收件人: qt-interest at qt.nokia.com
> 主题: Re: [Qt-interest] 答复: plugins directory
>
> Your plugin needs to be in a subdirectory named "sqldrivers" for this approach to work without setting LD_LIBRARY_PATH, I think. This mimics the structure of the global ${QTDIR}/plugins directory. At least, that's how it worked in Qt 3.x -- I think it's the same for Qt 4.x
>
> Joseph A. Caputo
> Vice President, Technology
> QED Financial Systems, Inc.
> 10,000 Sagemore
> Marlton, New Jersey 08053 USA
>
> tel
> 856.797.1200
> fax
> 856.797.9719
> email
> caputo at QEDFinancialSystems.com
> This electronic message is intended only for the receipt by, and the personal and confidential use of, the designated recipient(s) named above.
> If you are not an intended recipient of this electronic message you are hereby notified that any review, dissemination, distribution or copy of
> this message is strictly prohibited. QED Financial Systems, Inc. reserves all rights to the content of this electronic message, which is the
> exclusive property of QED Financial Systems.
>
>
> On 2010-12-16 03:57, pengliang(彭亮) wrote:
> I ran it in computer2(it installed Qt4.5.1. but I copy all librarys and plugins of Qt4.7.1 into the directory of the program and “addLibraryPath(“the program directory”). But it failed.
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
Hi,
Did you, as i wrote in an earlier response, install the mysql client library on computer2 ? (i.e emerge mysql on Gentoo or apt-get install libmysqlclient16 on Debian/Ubuntu)
You need the plugin to have the MySql interface in Qt but you still need the MySql client library to actually talk with the database.
Hope this helps
Samuel
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101223/b7ca547d/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: application/octet-stream
Size: 1281 bytes
Desc: main.cpp
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101223/b7ca547d/attachment.obj
More information about the Qt-interest-old
mailing list