【问题标题】:How to link QCA to my Qt project?如何将 QCA 链接到我的 Qt 项目?
【发布时间】:2016-10-25 01:26:32
【问题描述】:

我已成功克隆 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

我收到此错误

QT 中的未知模块:加密

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

LIBS += -lqca

LIBS += -lqca2

两者都导致错误:

找不到-lqca

我该怎么办?我按照官方的 README/INSTALL 说明进行操作。

【问题讨论】:

    标签: c++ qt dynamic-linking


    【解决方案1】:

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

    LIBS += -lqca
    

    你需要

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-14
      • 2019-01-20
      • 1970-01-01
      • 2014-01-28
      • 2021-10-28
      • 1970-01-01
      相关资源
      最近更新 更多