• 5179阅读
  • 0回复

QT 4.3 evaluation version 是否支持DB2 连接? [复制链接]

上一主题 下一主题
离线zhguowen
 

只看楼主 倒序阅读 楼主  发表于: 2007-08-05
QT 4.3 evaluation version 是否支持DB2 连接?
— 本帖被 XChinux 执行加亮操作(2007-08-12) —
因本人做毕业设计,想用QT做个界面,需要连接DB2(windows本地数据库)。下载了一个QT4.3for windows VC6的版本,请问它能否支持连接DB2?如果不能请教啥版本可以支持连接DB2?
本人开发环境:windows +VC6.0+DB2 V8.2+QT4.3

1、根据手册,如果要连接DB2,需要build the plugin on windows ,以下是手册中的步骤:

How to Build the Plugin on Windows
The DB2 header and include files should already be installed in the right directories. You just have to build the plugin as follows:

    cd %QTDIR%\src\plugins\sqldrivers\db2
    qmake -o Makefile "INCLUDEPATH+=<DB2 home>/sqllib/include" "LIBS+=<DB2 home>/sqllib/lib/db2cli.lib"
    nmake

问题:在我安装的QT中根本没有%QTDIR%\src\plugins目录,为何?

2、本人在QT官方网站上查到一篇FAQ,内容如下:
How do I setup a database driver with Qt on Windows?
--------------------------------------------------------------------------------
Answer:If you need to use databases like MySQL and psql with Qt, then you need to make sure your environment is set up correctly for this to work. In order to use psql for example, follow these steps :

Install PostgreSQL into c:\psql and Qt into c:\qt\4.3.0
Add c:\psql\bin (where the dlls are) to the PATH environment variable
Add c:\psql\include (where the include files are) to the INCLUDE environment variable
Add c:\psql\lib (where the libs are) to the LIB environment variable
In c:\qt\4.3.0 run: configure -plugin-sql-psql

Test using the sqlbrowser demo that it finds the psql plugin

Note that there is no need to copy any dlls or reference header files - it will work providing the environment variables are correctly set up.

请问:PostgreSQL是什么?如何得到?
[ 此贴被XChinux在2007-08-12 22:34重新编辑 ]
快速回复
限100 字节
 
上一个 下一个