How add a Crypto++ Library version 8.6 in Qt 6
-
Hi, for my project i need **Crypto++ Library**, but i don't understand how install it and connect it to Qt project.
Other informations:
- Qt version: 6.1.2
- Language: C++
- Library: Crypto++ Library version 8.6
- Compilator: (use it in Qt) MinGW 64-Bit
-
Hi, for my project i need **Crypto++ Library**, but i don't understand how install it and connect it to Qt project.
Other informations:
- Qt version: 6.1.2
- Language: C++
- Library: Crypto++ Library version 8.6
- Compilator: (use it in Qt) MinGW 64-Bit
@Alby If it is a new project I would recommend to create a CMake project. Then you can use vcpkg to install crypto++.
vcpkg search crypto
will help to find the proper package (it is called cryptopp).
Aftervcpkg install cryptopp
it is installed on your machine and if you have followed the vcpkg setup guide it will be available to your cmake project after you have placed everything necessary in the CMake file. -
Hi, for my project i need **Crypto++ Library**, but i don't understand how install it and connect it to Qt project.
Other informations:
- Qt version: 6.1.2
- Language: C++
- Library: Crypto++ Library version 8.6
- Compilator: (use it in Qt) MinGW 64-Bit
@Alby You need to set CMAKE_TOOLCHAIN_FILE to the location where you have installed vcpkg and the support script. This can be done in Qt Creator via Projects/Build Settings. I added the following there for my app:
-DCMAKE_TOOLCHAIN_FILE=<vcpkg_install_dir>\scripts\buildsystems\vcpkg.cmake
This needs to be done for every build type.In your
CMakeLists.txt
you then need to add the following (at the correct places of course):
find_package(cryptopp CONFIG REQUIRED)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE cryptopp-static)
That´s it.
-
Hi, for my project i need **Crypto++ Library**, but i don't understand how install it and connect it to Qt project.
Other informations:
- Qt version: 6.1.2
- Language: C++
- Library: Crypto++ Library version 8.6
- Compilator: (use it in Qt) MinGW 64-Bit
@Alby Download binary and headers. In your .pro file add
INCLUDEPATH
,DEPENPATH
andLIBS
manually or as described in the manual.
After that you can#include
headers in your sources. If you do#include
but QtCreator complains that file can't be found - you did the above wrong.