Open edibleparts opened 5 days ago
https://opentelemetry.io/docs/languages/cpp/getting-started/
cmake_minimum_required(VERSION 3.25) project(RollDiceServer)
set(CMAKE_CXX_STANDARD 17)
find_package(Threads REQUIRED)
set(SOURCES main.cpp # Add your source files here )
add_executable(${PROJECT_NAME} ${SOURCES})
set(OATPP_ROOT ../oatpp) find_library(OATPP_LIB NAMES oatpp HINTS "${OATPP_ROOT}/build/src/" NO_DEFAULT_PATH)
if(NOT OATPP_LIB) message(SEND_ERROR "Did not find oatpp library ${OATPP_ROOT}/build/src") endif()
target_include_directories(${PROJECT_NAME} PRIVATE ${OATPP_ROOT}/src)
Server. when running and serving HTTP requests (those seem to work), does not print anything to terminal.
@open-telemetry/cpp-approvers Could you check this please?
@edibleparts Feel free to open a PR! Thanks!
https://opentelemetry.io/docs/languages/cpp/getting-started/
Suggested improvements for page: RollDiceServer suggested CMakeLists.txt is out of date and does not include pthread dependency. It fails to build. Corrected CMakeLists.txt (added pthread dependency):
cmake_minimum_required(VERSION 3.25) project(RollDiceServer)
Set C++ standard (e.g., C++17)
set(CMAKE_CXX_STANDARD 17)
find_package(Threads REQUIRED)
Define your project's source files
set(SOURCES main.cpp # Add your source files here )
Create an executable target
add_executable(${PROJECT_NAME} ${SOURCES})
set(OATPP_ROOT ../oatpp) find_library(OATPP_LIB NAMES oatpp HINTS "${OATPP_ROOT}/build/src/" NO_DEFAULT_PATH)
if(NOT OATPP_LIB) message(SEND_ERROR "Did not find oatpp library ${OATPP_ROOT}/build/src") endif()
Set the path to the directory containing "oatpp" package configuration files
target_include_directories(${PROJECT_NAME} PRIVATE ${OATPP_ROOT}/src)
Link libraries to your target
target_link_libraries(${PROJECT_NAME} PRIVATE ${OATPP_LIB}) target_link_libraries(${PROJECT_NAME} PUBLIC Threads::Threads)
Server. when running and serving HTTP requests (those seem to work), does not print anything to terminal.