如何link QCA 到我的Qt 项目?

How to link QCA to my Qt project?

我已成功克隆 git repository of QCA 并使用

构建它
cmake .
make
sudo make install

这创建了包含一些可执行文件的 bin 目录,我可以通过 运行

确认一切正常
$ bin/qcatool-qt5 plugins
  /usr/lib/x86_64-linux-gnu/qt5/plugins
  /home/metheuser/qtcreator/qca/bin
Available Providers:
  qca-gnupg
  qca-logger
  qca-ossl
    This product includes cryptographic software written by Eric Young
    (eay@cryptsoft.com)
  qca-softstore

然而,当我在我的 Qt 项目中指定时:

QT += crypto

我收到这个错误

Unknown module(s) in QT: crypto

我现在不知道如何包含库。我尝试将其添加到我的 .pro 文件中:

LIBS += -lqca

LIBS += -lqca2

两者都导致错误:

cannot find -lqca

我该怎么办?我遵循了官方 README/INSTALL 说明。

您需要将 lib 路径添加到您的 .pro 文件中。所以,而不是

LIBS += -lqca

你需要

LIBS += -L$${PATH_QCA_LIB} -lqca