Compiling and using Crypto + + (MinGW version of QT) __QT

Source: Internet
Author: User

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 &LT;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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.