WSL Note: WSL maps Windows drives. ~/Downloads
becomes /mnt/c/Users/jeffmill/Downloads
Invoke-WebRequest -Uri 'https://aka.ms/vs/17/release/vs_BuildTools.exe' -OutFile "$env:TEMP/vs_BuildTools.exe"
& "$env:TEMP/vs_BuildTools.exe" --passive --wait --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended
$env:PATH += ";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin"
winget install 'Git.git'
cd \
git clone https://github.com/microsoft/vcpkg
.\vcpkg\bootstrap-vcpkg.bat
cmake.exe -B build -S . -D CMAKE_TOOLCHAIN_FILE='/vcpkg/scripts/buildsystems/vcpkg.cmake'
Note: You can also specify Release
or RelWithDebInfo
instead of Debug
.
cmake.exe --build build --parallel --config Debug
./build/Debug/sha256sum.exe
winget install 'WinDbg Preview'
windbgx.exe -y '\vcpkg\packages\poco_x64-windows\debug\bin' -c 'bp sha256sum!Application::main; g' -xe eh .\build\Debug\sha256sum.exe *
sudo apt update --yes && sudo apt upgrade --yes
sudo apt-get install build-essential cmake --yes
sudo apt-get install curl zip unzip tar pkg-config --yes
git clone https://github.com/Microsoft/vcpkg.git ~/vcpkg
~/vcpkg/bootstrap-vcpkg.sh
cmake -B build -S . -D CMAKE_TOOLCHAIN_FILE='~/vcpkg/scripts/buildsystems/vcpkg.cmake'
Note: You can also specify Release
or RelWithDebInfo
instead of Debug
.
cmake --build build --parallel --config Debug
If building with Release, use strip build/sha256sum
afterwards to strip binary of symbols. Unclear why this is needed for Release build.
# For sha256sum test app
mkdir ~/.local/tmp
chmod u+x build/sha256sum
build/sha256sum
Use gdb. catch throw
might catch C++ exceptions at source.
POCO includes samples as well. Enlist in the POCO repo:
git clone https://github.com/pocoproject/poco.git
then search for the projects:
Get-ChildItem -Recurse -Directory | Select-Object FullName | Where-Object FullName -like '*\samples\*\src'