PDA

View Full Version : Problem installing QCA-OSSL (part of the Qt Cryptographic Architecture) plugin



oracal
3rd January 2011, 14:49
Hi there.

I have been trying to use QCA on my Windows 7 PC for a couple of days now, works fine on my linux box, just can't get it working with Windows.

So i followed all the instructions for installing QCA and then the ossl plugin for QCA. The QCA works fine but for some reason the plugin isn't showing up in my Qt Creator nor am I able to use some of the functions in the plugin.

I used the qcatool2.exe that comes with QCA to check my plugins using


qcatool2 plugins --debug

and get this error message:


plugin: qca-ossl2.dll: failed to load: The plugin 'C:/Qt/2010.05/qt/plugins/crypto/qca-ossl2.dll' uses incompatible Qt library. Expected build key "Windows mingw debug full-config", got "Windows mingw release full-config"
Now this seems to me as if qt requires the plugin to be compiled in debug mode (as to get the build key to contain debug rather than release) so I added


CONFIG += debug

to my plugin's project file and ran qmake and mingw32-make as ussual but this seems to have had no effect.

My project file for the plugin is now:


TEMPLATE = lib
CONFIG += plugin
QT -= gui
DESTDIR = lib

VERSION = 2.0.0

unix:include(conf.pri)
windows:CONFIG += crypto
windows:include(conf_win.pri)

CONFIG += create_prl

SOURCES = qca-ossl.cpp

windows:{
load(winlocal.prf)
isEmpty(WINLOCAL_PREFIX) {
error("WINLOCAL_PREFIX not found. See http://delta.affinix.com/platform/#winlocal")
}

OPENSSL_PREFIX = $$WINLOCAL_PREFIX
DEFINES += OSSL_097

INCLUDEPATH += $$OPENSSL_PREFIX/include
LIBS += -L$$OPENSSL_PREFIX/lib
LIBS += -llibeay32 -lssleay32
LIBS += -lgdi32 -lwsock32
}

!debug_and_release|build_pass {
CONFIG(debug, debug|release) {
mac:TARGET = $$member(TARGET, 0)_debug
windows:TARGET = $$member(TARGET, 0)d
}
}

CONFIG += debug

Has anyone got any ideas? If you need anymore details just ask, I've tried to be as thorough as possible. Thanks

Tom

pocketchange
9th March 2011, 23:24
I've been running into something similar, but I've had much more success with the current QCA in kdesupport/qca and CMake. Here is a snippet from my documentation on how to reproduce what I've done:

Install The OpenSSL-Win32 (0.9.8r) into the path C:/OpenSSL-Win32-0.9.8r/

Run the following from the Qt SDK 1.1b command prompt (run with administrator
privileges):

C:\workspace> svn checkout svn://anonsvn.kde.org/home/kde/trunk/kdesupport/qca
C:\workspace> mkdir qca-build
C:\workspace> set CMAKE_INCLUDE_PATH=C:\OpenSSL-Win32\include
C:\workspace> set CMAKE_LIBRARY_PATH=C:\OpenSSL-Win32\lib
C:\workspace> cd qca-build
C:\workspace\qca-build> cmake
-G"MinGW Makefiles"
-DOPENSSL_EAY_LIBRARIES=C:/OpenSSL-Win32-0.9.8r/lib/libeay32.lib
-DOPENSSL_INCLUDE_DIR=C:/OpenSSL-Win32-0.9.8r/include
-DOPENSSL_LIBRARIES=C:/OpenSSL-Win32-0.9.8r/lib/ssleay32.lib
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=C:\QtSDK\Desktop\Qt\4.7.2\mi ngw ../qca
C:\workspace\qca-build> mingw32-make
C:\workspace\qca-build> mingw32-make install

Although it's worth mentioning that I'm still having troubles myself:
http://www.qtcentre.org/threads/39507-QCA-%28on-Windows%29-trouble-using-qca-ossl-when-creating-a-public-key?p=181315#post181315

Added after 13 minutes:

You should also be able to do a "mingw32-make test" after you've installed and you should be able to see everything pass.