Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've been struggling with a similar situation: qca-ossl builds fine on linux and not at all on windows. I just hit a breakthrough which might help you as well.</p> <p><strong>Versions and Patches</strong></p> <ul> <li>qtsdk-2010.05</li> <li>qca-2.0.3</li> <li>qca-ossl-r1190163 (from the repository)</li> <li>openssl-1.0.0b</li> </ul> <p>First of all, if you're using a newer version (0.9.7+, I think) of OpenSsl, you may need to use the qca-ossl version from the repository since it patches some incompatibilities. I also needed to comment out some lines in the new qca-ossl.cpp file dealing with SHA224, SHA256, SHA384, and SHA512 to avoid build errors. I'm using qca-ossl for the ciphers, so I'm not worried about hashing and didn't investigate the errors very much.</p> <p><strong>Fixing It</strong></p> <p>The windows build problems were many fold for me, but most of them stem from the shoddy build setup for the windows version of the plugin. It's nice having a little configure script for the linux side of things, but what about windows? We need to do a little extra work.</p> <p>Some of this extra work is because I've chosen non-standard locations for the support libraries of my application. Qca and OpenSsl both exist within the project's directory structure in a libraries/ directory. My guess is that you've done something similar if you are trying to cross compile your application, but even if you didn't the following should help.</p> <p><strong>Finding OpenSsl</strong></p> <p>Qca-ossl wont build very well if it can't find the library it's supposed to connect to... :) So let's specify directly where it is. Comment out the lines relating to winlocal.prf and the changes that stem from it in qca-ossl.pro. We will directly specify where to find openSsl.</p> <pre><code>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:{ # Rather than rely on the winlocal.prf file, we will specify the location of the openssl # by hand when running qmake. # # 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 } } </code></pre> <p>Now we have direct access to the $$OPENSSL_PREFIX environment variable in the .pro file. We can set it when we call qmake by doing the following.</p> <pre><code>qmake.exe "OPENSSL_PREFIX=C:/path/to/openssl-1.0.0b"</code></pre> <p>You should be able to use backward slashes or forward slashes. Here I choose forward since Qt has deprecated them since 4.7.</p> <p>Alternatively, you could set the OPENSSL_PREFIX variable directly in the .pro file.</p> <p><strong>Finding Qca</strong></p> <p>After comparing the unix and windows makefiles for qca-ossl, oddly enough, it never includes the qca libraries for building or linking! ?!?! This led to an "Undefined interface" error on the Q_INTERFACES(QCAPlugin) line of the opensslPlugin class definition at the end of qca-ossl.cpp.</p> <p>To avoid this, we will need to explicitly define the include and library paths by hand. Expanding on the qmake line from the last section the final qmake line is as follows.</p> <pre><code>qmake.exe "OPENSSL_PREFIX=C:/path/to/openssl-1.0.0b" "INCLUDEPATH+=C:/path/to/qca-2.0.3/include/QtCrypto" "LIBS+=-LC:/path/to/qca-2.0.3/lib -lqca2"</code></pre> <p><strong>"Installing" Qca-ossl</strong></p> <p>After running the qmake line above and running a plain ol' make, you'll need to install Qca-ossl. You can copy the resulting dll from the lib/ directory to your Qt's plugins directory, which if you're using my versions defaults to C:\Qt\2010.05\qt\plugins\crypto. Alternatively, you can move it to a crypto directory that's at the root level of your project's directory structure such as C:\path\to\my\project\crypto.</p> <p>I hope this helps!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload