windows下正常编译postgreSQL针对Qt的驱动后的相应设置[原]
2010-06-22 12:31
465 查看
根据Qt助手SQL Database Drivers 章节内容安装postgreSQL 8.4 for windows后,按照Qt官方的文档
How to Build the QPSQL Plugin on Windows
Install the appropriate PostgreSQL developer libraries for your compiler. Assuming that PostgreSQL was installed in C:\psql, build the plugin as follows:
cd %QTDIR%\src\plugins\sqldrivers\psql
qmake "INCLUDEPATH+=C:\psql\include" "LIBS+=C:\psql\lib\ms\libpq.lib" psql.pro
nmake
设置相对应的pgsql的目录,然后直接打开QtCreator打开psql.pro项目编译就成功生成相应的dll (D:\Qt\2010.03\qt\plugins\sqldrivers), 但此时还是不能正常使用该驱动,原因是pgsql的库未加入到PATH里面。
设置好后
QApplication a(argc, argv);
qDebug() << QSqlDatabase::drivers();
return a.exec();
相应的名字为 "QPSQL7","QPSQL"
参考文章 http://www.qtcentre.org/wiki/index.php?title=Building_the_QPSQL_plugin_on_Windows_using_MinGW
How to Build the QPSQL Plugin on Windows
Install the appropriate PostgreSQL developer libraries for your compiler. Assuming that PostgreSQL was installed in C:\psql, build the plugin as follows:
cd %QTDIR%\src\plugins\sqldrivers\psql
qmake "INCLUDEPATH+=C:\psql\include" "LIBS+=C:\psql\lib\ms\libpq.lib" psql.pro
nmake
设置相对应的pgsql的目录,然后直接打开QtCreator打开psql.pro项目编译就成功生成相应的dll (D:\Qt\2010.03\qt\plugins\sqldrivers), 但此时还是不能正常使用该驱动,原因是pgsql的库未加入到PATH里面。
设置好后
QApplication a(argc, argv);
qDebug() << QSqlDatabase::drivers();
return a.exec();
相应的名字为 "QPSQL7","QPSQL"
参考文章 http://www.qtcentre.org/wiki/index.php?title=Building_the_QPSQL_plugin_on_Windows_using_MinGW
相关文章推荐
- Windows平台下编译Qt的MySQL数据库驱动
- Windows下编译Qt的Mysql驱动
- windows 下 Qt4.8编译oracle数据库OCI驱动 并使用
- Windows下编译Qt4.8 MySQL数据库驱动
- Qt4.7.3(MinGW Opensource版)windows编译mysql驱动
- windows下Qt5.6.0 编译Mysql驱动,并使用。
- Windows下编译Qt的Mysql驱动(详细测试可用)
- windows下编译qt的mysql驱动
- windows下编译qt的mysql驱动
- windows下编译qt的mysql驱动,终于成功了,一定记录下
- QT Mysql 驱动编译过程(windows下)
- windows操作系统下:QT编译mysql驱动文件问题总结
- Windows下编译Qt的MySQL数据库驱动
- QT在windows下编译mysql驱动
- windows下Qt编译MySQL驱动
- windows下编译qt的mysql驱动
- Windows下编译Qt的Mysql驱动
- 如何设置让未签名的老驱动在Windows 8下正常工作
- Windows下编译Qt的Mysql驱动(详细测试可用)
- Qt编译PostgreSQL数据库驱动