Bitcoin full node and query server

May 26, 2026

View in context in the libbitcoin Slack #general mirror.

E
Enligths19:37
After building libbitcoin-server with MSVC v2022, I wanted to write a small program similar to the ones available on libbitcoin-system wiki. https://github.com/libbitcoin/libbitcoin-system/wiki/Examples-from-Serialised-Data This example was written with libbitoin v3 but this is not my current problem. First I tried to run a hello-world program where the following header is present: #include <bitcoin/system.hpp>
#include <iostream>
#include <bitcoin/system.hpp>
using namespace std;

int main()
{
    cout << "Hello, world, from Microsoft C++!" << endl;
}
I am using the <cl> compiler provided with Visual Studio through command line. I added to %LIB path all the lib files generated during the bild process and all the header folders in %INCLUDE path.
REM ============================================================================
set include=C:\Users\tanan\source\repos\libbitcoin-server\include;%include%
set lib=C:\Users\tanan\source\repos\libbitcoin-server\bin\x64\Debug\v143\static;%lib%

set include=C:\Users\tanan\source\repos\libbitcoin-node\include;%include%
set lib=C:\Users\tanan\source\repos\libbitcoin-node\bin\x64\Debug\v143\static;%lib%

set include=C:\Users\tanan\source\repos\libbitcoin-network\include;%include%
set lib=C:\Users\tanan\source\repos\libbitcoin-network\bin\x64\Debug\v143\static;%lib%

set include=C:\Users\tanan\source\repos\libbitcoin-database\include;%include%
set lib=C:\Users\tanan\source\repos\libbitcoin-database\bin\x64\Debug\v143\static;%lib%

set include=C:\Users\tanan\source\repos\libbitcoin-system\include;%include%
set lib=C:\Users\tanan\source\repos\libbitcoin-system\bin\x64\Debug\v143\static;%lib%
REM ============================================================================


REM ============================================================================
set include=C:\Users\tanan\source\repos\.nuget\packages\secp256k1_vc143.0.6.1\build\native\include;%include%
set lib=C:\Users\tanan\source\repos\.nuget\packages\secp256k1_vc143.0.6.1\build\native\bin;%lib%

set include=C:\Users\tanan\source\repos\.nuget\packages\boost.1.86.0\lib\native\include;%include%
set lib=C:\Users\tanan\source\repos\.nuget\packages\boost_iostreams-vc143.1.86.0\lib\native;%lib%
set lib=C:\Users\tanan\source\repos\.nuget\packages\boost_locale-vc143.1.86.0\lib\native;%lib%
set lib=C:\Users\tanan\source\repos\.nuget\packages\boost_program_options-vc143.1.86.0\lib\native;%lib%
set lib=C:\Users\tanan\source\repos\.nuget\packages\boost_thread-vc143.1.86.0\lib\native;%lib%
set lib=C:\Users\tanan\source\repos\.nuget\packages\boost_unit_test_framework-vc143.1.86.0\lib\native;%lib%
set lib=C:\Users\tanan\source\repos\.nuget\packages\boost_url-vc143.1.86.0\lib\native;%lib%
REM ============================================================================
I got the following error (partially in french). It seems to me the compiler managed to find the header but got stuck somewhere along the lines. Maybe something is missing the compiler command. Is there someone that can help me?
C:\Users\tanan\code\libbitcoin-example>cl /EHsc hello.cpp

Compilateur d'optimisation Microsoft (R) C/C++ version 19.44.35227 pour x64
Copyright (C) Microsoft Corporation. Tous droits réservés.

hello.cpp
C:\Users\tanan\source\repos\libbitcoin-system\include\bitcoin/system/preprocessor.hpp(185): error C2338: static_assert failed: 'C++20 minimum required.'
Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:
- add -D_WIN32_WINNT=0x0601 to the compiler command line; or
- add _WIN32_WINNT=0x0601 to your project's Preprocessor Definitions.
Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).
C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.44.35207\include\bit(11): warning STL4038: The contents of <bit> are available only with C++20 or later.
C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.44.35207\include\variant(12): warning STL4038: The contents of <variant> are available only with C++17 or later.
C:\Users\tanan\source\repos\libbitcoin-system\include\bitcoin/system/types.hpp(189): error C3646: 'data_t' : spécificateur de substitution inconnu
C:\Users\tanan\source\repos\libbitcoin-system\include\bitcoin/system/types.hpp(189): note: le contexte d'instanciation du modèle (le plus ancien) est
C:\Users\tanan\source\repos\libbitcoin-system\include\bitcoin/system/types.hpp(186): note: lors de la compilation du modèle de classe 'libbitcoin::data_t'
C:\Users\tanan\source\repos\libbitcoin-system\include\bitcoin/system/types.hpp(189): error C2059: erreur de syntaxe : '('
C:\Users\tanan\source\repos\libbitcoin-system\include\bitcoin/system/types.hpp(190): error C2334: jetons inattendus avant ':' ; corps apparent de la fonction ignoré
C:\Users\tanan\source\repos\libbitcoin-system\include\bitcoin/system/types.hpp(27): fatal error C1075: '{' : jeton correspondant introuvable
(edited)