gpt4 book ai didi

c++ - 如何在VS2015中使用PostgreSQL插件静态编译Qt 5.8

转载 作者:塔克拉玛干 更新时间:2023-11-03 07:10:14 31 4
gpt4 key购买 nike

任何可能知道在 Windows 上使用 PostgreSQL 支持静态编译 Qt 5.8 Open Source 的人都可以吗?我尝试了所有已知的选项,包括以下选项。我在 Windows 10 x64 上使用 qt 5.8 源代码。

configure -opensource -confirm-license -debug-and-release -static -platform win32-msvc2015 -nomake examples -nomake tests -sql-psql PSQL_LIBS="C:\PSQL\9.6\lib\libpq.lib" -I C:\PSQL\9.6\include\libpq -I C:\PSQL\9.6\include -L C:\PSQL\9.6\lib\libpq.lib

运行上面的配置后,我似乎得到以下信息:

Note: Using static linking will disable the use of dynamically loaded plugins. Make sure to import all needed static plugins, or compile needed modules into the library. ERROR: Feature 'sql-psql' was enabled, but the pre-condition 'libs.psql' failed. Check config.log for details.

我是不是漏掉了什么?

最佳答案

在构建 Qt 5.9.1 时这对我有用

configure -prefix <your parameters> ^
PSQL_LIBS="D:\PostgreSQL\9.6\lib\libpq.lib" ^
-I D:\PostgreSQL\9.6\include ^
-L D:\PostgreSQL\9.6\lib

关于c++ - 如何在VS2015中使用PostgreSQL插件静态编译Qt 5.8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42897652/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com