如何告诉Qt应该在哪里寻找openssl? [英] How can I tell Qt where it should look for openssl?

查看:114
本文介绍了如何告诉Qt应该在哪里寻找openssl?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显然,它可以获取系统openssl.例如,在macOS上,我宁愿使用自制安装的openssl,并将其打包到我的dmg中,以便用户无需自己安装它.

And apparently, it gets the system openssl. For instance, on macOS, I would rather use the homebrew-installed openssl, and package it into my dmg, so that the users don't need to install it themselves.

如何告诉Qt在哪里寻找它链接的库? qt.conf文件和什么有关?

How can I tell Qt where to look for the libraries it links? Is there something to do with the qt.conf file?

推荐答案

您可以在.pro文件中执行类似的操作:

you can do something like that in your .pro file:

win32-msvc* {
    LIBS += -LC:/openssl/lib/ -llibeay32
    LIBS += -LC:/openssl/lib/ -lssleay32

    INCLUDEPATH += C:/openssl/include
}

在项目上单击鼠标左键->添加库->外部库->选择.lib文件和该库的include文件夹.检查它是哪个平台. 它将特定的平台Dependend命令放到您的项目.pro文件中.

left click on your project -> add library -> external library -> choose the .lib file and the include folder for the library. check for which platform it is. It will put the specific platform dependend commands to your project .pro filefile.

这篇关于如何告诉Qt应该在哪里寻找openssl?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆