Original address: Http://www.qtcentre.org/threads/28809-Compiling-amp-using-Crypto-with-mingw-version-of-Qt
I personally have trouble with these. The explicitly compiled Crypto + + version (Cryptopp530win32win64.zip) is built using MSVC and cannot be used with MinGW.
Luckily, I can make it work eventually.
So I'll tell you what to do in one step.
First download Cryptopp552.zip (Crypto + + v5.5.2 source)
Why Cryptopp552.zip. This is obviously the latest version of successful compilation with MinGW.
Extracts the contents of Cryptopp552.zip to C:\ cryptopp552
Edit C:\ cryptopp552 \ Fipstest.cpp and replace each ' outputdebugstring ' with ' Outputdebugstringa '. (Total 3 replacements)
Don't forget to save it.
Delete C:\ cryptopp552 \ Gnumakefile
Open qt Command Prompt (I use QT SDK 2009.05)
Enter the following command on the QT command line:
C:
CD \ cryptopp552
Qmake-project
Open Cryptopp552.pro (now created in C:\ cryptopp552)
In the Inside:
Change template = app to template = Lib
The last Add line contains libs + =-lws2_32.
Type the following command on the QT command line:
Qmake
Mingw32-make All
Wait for the build process to complete (may take many minutes)
Now we should have files named libcryptopp552.a and Cryptopp552.dll in the directory C:\ cryptopp552 \ Release and C:\ cryptopp552 \ Debug
Copy c:\ cryptopp552 \ release \ libcryptopp552.a to <qt dir> \ Lib
Note that there is another directory in the QT SDK installation directory called Lib level. So don't confuse them.
Copy c:\ cryptopp552 \ release \ cryptopp552.dll to <qt dir> \ Bin
Please note that there is another directory named bin level in the QT SDK installation directory. So don't confuse them.
Create a directory named Cryptopp in <QT dir> \ include.
Copy all header files (. h) from C:\ cryptopp552 to <qt dir> \ include \ Cryptopp.
The corresponding header file is introduced when using
Remember, you should add these lines to the. Pro file before you start building it:
LIBS + =-lcryptopp552