Building executable files for the HTTP service and the HTTP client
April 24, 2024
ID 179888
You can compile the kavehttpd service and the sample HTTP client from the source code located in the %service_dir%/samples/kavhttp/
directory.
Software requirements
To compile kavehttpd service and the sample HTTP client, you must install the following software on you computer:
- Boost 1.72.0 or later. The kavehttpd service source files are liked with Boost dynamically, which requires the boost-devel package.
The boost libraries must be compiled statically. You can find a list of the necessary boost libraries in
%service_dir%/samples/kavhttp/Makefile
. - OpenSSL library. It is recommended to install the openssl-devel package.
- PostgreSQL libraries from 6.4.4 to 7 (non-inclusive). It is recommended to install the libpqxx-devel package.
- GNU Compiler Collection (GCC) 7.3.0 or later. Use the same version of GCC to compile Boost and the kavhttpd service.
Compiling Kaspersky Scan Engine and the sample HTTP client in Linux
To compile Kaspersky Scan Engine and the sample HTTP client in Linux:
- Navigate to the
%service_dir%/samples/kavhttp/
directory. - Run
make
.The compiled client executable files will be placed in the
%service_dir%/bin
directory. The compiled service executable files will be placed in the%service_dir%/opt/kaspersky/ScanEngine/sdk8l3/bin/
directory.
The following example demonstrates building the executable files:
user@computer:/opt/kaspersky/ScanEngine# cd ./samples/kavhttp/ user@computer:/opt/kaspersky/ScanEngine/samples/kavhttp/# make |
Kaspersky Scan Engine and the sample HTTP client in Windows
To compile Kaspersky Scan Engine and the sample HTTP client in Windows:
- Navigate to the
%service_dir%/samples/kavhttp/http_service/windows
folder. - Do the following:
- If you want to compile the kavehttpd service, open the
kavhttpd.vcxproj
file in Microsoft Visual Studio 2017 and later. - If you want to compile the sample HTTP client, open the
kavhttp_client.vcxproj
file in Microsoft Visual Studio 2017 and later.
- If you want to compile the kavehttpd service, open the
- Right-click the project in Solution Explorer and select Properties.
- In the properties window that opens, in the left navigation tree, select Configuration Properties > Linker > Input. For the Additional Dependencies property, add the paths to the Boost, OpenSSL, and PostgreSQL libraries.
- In the left navigation tree, select Configuration Properties > С/C++. For the Additional Include Directories property, add the headers of the Boost, OpenSSL, and PostgreSQL libraries.
- Right-click the project in Solution Explorer, and then select Build.
If you use Kaspersky Scan Engine GUI and intend to modify the provided binaries, please make sure to get prior approval for all changes from your technical account manager (TAM).