CD Setup Cpp Xpx Storage User App on Windows 130724 125735
CD Setup Cpp Xpx Storage User App on Windows 130724 125735
The following instructions are based on the experience with a clean Windows installation. Laptop specifications:
Скачать Инструменты Visual Studio — установить бесплатно для Windows, Mac, Linux
Pay attention to the version of the MSVC compiler you are installing: you will need it later for choosing Boost prebuilt binaries:
Install to C:\Qt . When installing, choose all components in Qt 6.x.x and in Additional Libraries:
4. Set your preferred IDE to enable C++20 support. Make sure that you can run C++20 code. Try running some sample code and see
whether it can successfully run and produces correct output. You can try this sample code:
1 #include <iostream>
2 int main()
3 {
4 auto result = (10 <=> 20) > 0;
5 std::cout << "result: " << result << std::endl;
6 }
5. Install Boost. It is advised that you use prebuilt Windows binaries instead of building your own Boost:
Download ...-64.exe version, like boost_1_85_0-msvc-14.3-64.exe , with the latest MSVC compiler version. Install Boost in
C:\boost_1_xx_x\ . It will look like this:
The highlighted folder lib64-msvc-14.3 should contain compiled .dlls :
Set 2 environment variables: in Search type ‘Edit the system environment variables’.
Add 2 system variables:
BOOST_INCLUDEDIR C:\boost_1_85_0
BOOST_ROOT C:\boost_1_85_0
6. Install OpenSSL. You can clone a repository and build on your own:
openssl/openssl
OpenSSL 3.3, 3.0 LTS, 1.1.1 LTS Binaries for Microsoft Windows
Install OpenSSL in C:\OpenSSL . It will look like this:
After the installation make sure your PATH environment variable (system-wide) is updated:
PATH C:\OpenSSL\bin\
Due to long filenames for tests, invoking the git submodule update --init --recursive --remote command twice might help.
ATTENTION! Make sure the path to StorageClientApp.exe is less than 256 symbols.
8. Configure Visual Studio.
1 {
2 "configurations": [
3 {
4 "name": "x64-Debug",
5 "generator": "Visual Studio 17 2022 Win64",
6 "configurationType": "Debug",
7 "inheritEnvironments": [ "msvc_x64_x64" ],
8 "buildRoot": "${projectDir}\\out\\build\\${name}",
9 "installRoot": "${projectDir}\\out\\install\\${name}",
10 "cmakeCommandArgs": "-DCMAKE_PREFIX_PATH=C:\\Qt\\6.7.2\\msvc2019_64 -DOPENSSL_ROOT_DIR=C:\\OpenSSL -DCMAKE
11 "buildCommandArgs": "",
12 "ctestCommandArgs": ""
13 }
14 ]
15 }
Make sure your ..\cpp-xpx-storage-user-app\CMakeLists.txt file contains the correct OpenSSL variables. For some reason, the
OpenSSL-related paths have to be doubled as variables in CMakeLists.txt and as CMake arguments:
Make sure you set -DCMAKE_BUILD_TYPE=Debug for correct deployment (copying all necessary .dlls to the folder with
StorageClientApp.exe ). If you encounter problems, you can also copy the necessary .dlls to the folder with StorageClientApp.exe by
hand:
dll name in Debug mode dll name in Release mode path to dll
ATTENTION! dlls that have the ' d ' letter at the end of the name (like Qt6Cored.dll, Qt6Guid.dll, Qt6Multimediad.dll ) are meant to
be used in Debug mode. For Release mode, use Qt6Core.dll, Qt6Gui.dll, Qt6Multimedia.dll and so on, respectively.
ATTENTION! After building, it may be necessary to run CMake once again for dlls to deploy.
When running, you can right-click the Debug Output window to disable unnecessary thread and module logs and leave only cpp-xpx-
storage-usr-app logs.
9. Configure QtCreator.
-DOPENSSL_ROOT_DIR=C:/OpenSSL -DCMAKE_BUILD_TYPE=Debug
ATTENTION! After building, it may be necessary to run CMake once again for dlls to deploy. In case of problems, copy dlls manually.
CMake options:
-DCMAKE_PREFIX_PATH=C:\Qt\6.7.2\msvc2019_64 -DCMAKE_TOOLCHAIN_FILE=C:\Users\xxxxx\.vcpkg-
clion\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Debug
ATTENTION! After building, it may be necessary to run CMake once again for dlls to deploy. In case of problems, copy dlls manually.