Closed x-tools-author closed 6 months ago
I known, just copy the libs(libcrypto.lib and libssl.lib) to the path[D:\Jenkins10\workspace\Qt\q6_5wx6v2sf\buildDir\OpenSSL3.0.13-Windows-x86_64-VS2022-17.9.0-static\lib]
Edit by Fsu0413:
Not proper workaround from my point of view.
Just add LIBS += -L$$[QT_INSTALL_LIBS]
in your .pro file and it's done.
So the library path is (again!) hardcoded in the configuration files.
It is include path and library path which needs to be set in CMake scripts instead of CMake variable OPENSSL_ROOT_DIR
The resulting files are as I expected (-L
/ -l
combination) and the static libraries are put into $$[QT_INSTALL_LIBS]
as probably automatically specified by Qt. The directory specified by -L
may not exist.
I wonder if Qt 6.5.3 really don't add -L$$[QT_INSTALL_LIBS]
in the prl files.
If that's the case it'll be frustrating. The replacement should be done in every static package.
I don't think there is any problem building with CMake.
CMake use CMAKE_PREFIX_PATH
variable which finds the libssl.lib
and libcrypto.lib
automatically in the lib
directory.
Since prl files may be used only by qmake so....
The only solution I came up with is to add QMAKE_PRL_LIBS += -L$$[QT_INSTALL_LIBS]
to QtCore.prl
In theory every Qt version needs this one or OpenSSL and MariaDB static libraries can't be linked.
我也遇到了这个问题,我使用VS2022工程编译,我应该在sln工程怎么设置?
我也遇到了这个问题,我使用VS2022工程编译,我应该在sln工程怎么设置? 将bin目录下的libcrypto.lib 和libssl.lib复制到D:\Jenkins10\workspace\Qt\q6_5wx6v2sf\buildDir\OpenSSL3.0.13-Windows-x86_64-VS2022-17.9.0-static\lib (上面的路径自己建)
我也遇到了这个问题,我使用VS2022工程编译,我应该在sln工程怎么设置?
我为了这个问题现场装了 Qt VS Tools。。。。。平时我不用VS的
右键工程 Properties -> Linker -> All Options
右边列表找到 Additional Library Directories 添加一项 $(QtInstallDir)/lib
主要是我不太想deploy后改这个东西。。。。。。。。 包括macOS还有rpath的问题,都是要deploy之后改的,我现在也不知道有没有什么好办法统一处理一下
解决: #25 简单来说:在 Windows / macOS 上不再于静态构建中附带 OpenSSL。
这个 issue 我关了。如果要追进度的化,看 #25。
Solution: #25 tl;dr: No longer ships OpenSSL with static builds on Windows / macOS.
This ticket will be closed. For future progress please refer to #25 .
编译程序出现以下错误::-1: error: LNK1181: 无法打开输入文件“libssl.lib” 使用的包是:Qt6.5.3-Windows-x86_64-VS2022-17.9.0-staticFull-20240216 是我打开的姿势有问题吗,大佬教教我