PDA

View Full Version : MinGW and qca-ossl



December
22nd February 2009, 06:09
Hi All,

I am have real problems with the qca, openssl and the qca-ossl plugin, been on it for about 40 hours over the last 2 weeks and am about ready to give up, I've tried every which way to get it working!

I am working with Qt 4.3.5 and the latest MinGW / msys and QCA stuff. My program works great on Linux (wow, using QCA in QT4 on Linux is soo easy, it rocks!)

After numerous problems compiling both OpenSSL and QCA2, I finally got them working.

Now I can't get the qca-ossl plugin source to produce a .dll, it only seems to make .o and .a files. All the instructions on the web ( like http://psi-im.org/wiki/Build_Instructions_Qt4#Building_the_QCA_plugin_for _OpenSSL_.28qca-ossl.29_2 ) indicated I should end up with a DLL, but I never seem to.

I tried a pre-compiled one I found on the web but it won't load ( qcatool2 shows: plugin: qca-ossl2.dll: failed to load: The file 'C:/qca2/bin/crypto/qca-ossl2.dll' is not a valid
Qt plugin.)

Does anyone know I I would not be getting a .dll (no errors at compile time), and how I could make one out of the .a and .o files?

Thanks loads

talk2amulya
22nd February 2009, 07:23
r u using a pro file for it? if yes, can we see it?

December
22nd February 2009, 10:10
I'm using the source (including .pro file) from here:

http://delta.affinix.com/download/qca/2.0/plugins/qca-ossl-2.0.0-beta3.tar.bz2

talk2amulya
22nd February 2009, 12:21
can you show the pro file here?

December
23rd February 2009, 03:02
qca-ossl.pro:


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
}
}

pocketchange
9th March 2011, 23:42
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