Git Product home page Git Product logo

poco-playground's Introduction

Poco apps using VCPKG

WSL Note: WSL maps Windows drives. ~/Downloads becomes /mnt/c/Users/jeffmill/Downloads

Windows Instructions

Install Visual Studio Build Tools (includes cmake)

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

Add CMAKE to path

$env:PATH += ";${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin"

Install vcpkg

winget install 'Git.git'

cd \

git clone https://github.com/microsoft/vcpkg

.\vcpkg\bootstrap-vcpkg.bat

Build

Generate makefiles

cmake.exe -B build -S . -D CMAKE_TOOLCHAIN_FILE='/vcpkg/scripts/buildsystems/vcpkg.cmake'

Build App

Note: You can also specify Release or RelWithDebInfo instead of Debug.

cmake.exe --build build --parallel --config Debug

Run

./build/Debug/sha256sum.exe

Debug

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 *

Linux Instructions

Install build-essential cmake

sudo apt update --yes && sudo apt upgrade --yes

sudo apt-get install build-essential cmake --yes

Install vcpkg

sudo apt-get install curl zip unzip tar pkg-config --yes

git clone https://github.com/Microsoft/vcpkg.git ~/vcpkg

~/vcpkg/bootstrap-vcpkg.sh

Build

Generate makefiles

cmake -B build -S . -D CMAKE_TOOLCHAIN_FILE='~/vcpkg/scripts/buildsystems/vcpkg.cmake'

Build App

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.

Run

# For sha256sum test app
mkdir ~/.local/tmp

chmod u+x build/sha256sum

build/sha256sum

Debug

Use gdb. catch throw might catch C++ exceptions at source.

References

POCO docs

POCO Reference

POCO Presentation

namespace Net

POCO samples

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'

VCPKG Manifest Mode

Manifest Mode

vcpkg.json Reference

Manifest mode: CMake example

poco-playground's People

Contributors

jeffmill avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.