如何在 Qt4.7 (Qt Creator) 中使用 QCA(http://delta.affinix.com/qca/)?
我想将 QCA 库与 QT4.7 和 QTCreator 一起用作 IDE。
我下载了“qca-2.0.2-mingw”版本并尝试将它们链接到我的“.Pro”文件中:
QT += core
QT -= gui
LIBS += -L"\qca-2.0.2-mingw\lib\"
LIBS += -lqca2
CONFIG *= qt
CONFIG += console
CONFIG -= app_bundle
INCLUDEPATH += "\qca-2.0.2-mingw\include\QtCrypto"
INCLUDEPATH += "\qca-2.0.2-mingw\bin"
TARGET = untitled1
TEMPLATE = app
LINKAGE = -lqca
CONFIG(debug, debug|release) {
windows:LINKAGE = -lqcad
mac:LINKAGE = -lqca_debug
}
LIBS += $$LINKAGE
SOURCES += main.cpp
它可以编译,但是当我运行从此位置复制的 HMAC 示例时,http://delta.affinix.com/docs/qca/mactest_8cpp-example.html#_a6
应用程序出现以下错误:
正在启动 C:\Qt\2010.04\qt\untitled1\release\untitled1.exe... C:\Qt\2010.04\qt\untitled1\release\untitled1.exe 退出,代码为 -1073741515
注释掉某些行并不会带来效果。即使 HMAX 示例的第一行,也会导致上述结果“QCA::Initializer init;”
我也尝试过“qca-2.0.0-mingw”,但出现了相同的效果。
首先问候并感谢,
马可
I want to use the QCA Library with QT4.7 and QTCreator as IDE.
I downloaded the "qca-2.0.2-mingw" Version and try to link them in my ".Pro"-file:
QT += core
QT -= gui
LIBS += -L"\qca-2.0.2-mingw\lib\"
LIBS += -lqca2
CONFIG *= qt
CONFIG += console
CONFIG -= app_bundle
INCLUDEPATH += "\qca-2.0.2-mingw\include\QtCrypto"
INCLUDEPATH += "\qca-2.0.2-mingw\bin"
TARGET = untitled1
TEMPLATE = app
LINKAGE = -lqca
CONFIG(debug, debug|release) {
windows:LINKAGE = -lqcad
mac:LINKAGE = -lqca_debug
}
LIBS += $LINKAGE
SOURCES += main.cpp
it compiles but when I run a HMAC sample, copied from this location, http://delta.affinix.com/docs/qca/mactest_8cpp-example.html#_a6
the application stuck with the following error:
Starting C:\Qt\2010.04\qt\untitled1\release\untitled1.exe...
C:\Qt\2010.04\qt\untitled1\release\untitled1.exe exited with code -1073741515
Commenting out some lines doesn't bring the effect. Even the first line of the HMAX Example, will lead to the results described above "QCA::Initializer init;"
I've tried the "qca-2.0.0-mingw" also, but the same effect occurres.
Greets and Thanks first,
Marco
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果它能够构建,那就已经很好了。如果它没有启动,通常是在运行时找不到 DLL。尝试将 qca DLL 的路径添加到您的 PATH 中。在创建者中,您可以在运行配置(项目/运行设置)的运行环境部分中进行配置。
If it builds, that's already good. If it doesn't start, usually DLLs are not found, at runtime. Try adding the path to the qca DLLs to your PATH. In creator you can configure that in the Run Environment section of your Run configuration (Project/Run Settings).