PDA

View Full Version : Using QCA with QT Creator



mrstif
18th October 2010, 14:52
Hey!

I'm trying to use QCA (QT Criptography Architecture) in QT creator.

QT creator shows me the classes and methods of QCA once I #include <QtCrypto/QtCrypto> but when I build a program it says "undefined reference" to all the stuff I'm using from QCA.

I realize that the problem should be related to linking the QCA libraries better but how do I do it?

Btw, I'm using Ubuntu 64bit and I installed qca through the synaptic package manager (libqca2, libqca2-doc, libqca2-dev).

Lykurg
18th October 2010, 15:51
How does your pro file looks like?

mrstif
18th October 2010, 16:00
Like this:



HEADERS += httpwindow.h
SOURCES += httpwindow.cpp \
main.cpp
FORMS += authenticationdialog.ui \
idchoicedialog.ui
QT += network

symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)


The qca library is in /usr/lib/libqca.so.2.0.2 ...

Lykurg
18th October 2010, 16:04
You have to link against the library. See the LIBS variable. (You find an explanation in the qmake documentation.) Try it yourself, but when you stuck, ask again.

mrstif
18th October 2010, 16:31
I solved it by adding LIBS += -L /usr/lib/ -lqca

Thanks for the tip!