Skip to content

sentry installation and configuration #306

@Prachiagrawal1

Description

@Prachiagrawal1

Followed it to use sentry for my cpp app till this step:
To build:

Use Windows Explorer to delete any CMakeFile folder within this folder ...
cd \sentry-native
Patch CMakeLists.txt as follows:

if(WIN32)
set(SENTRY_DEFAULT_TRANSPORT "winhttp")
MY CHANGES BEGIN
https://stackoverflow.com/questions/14172856/compile-with-mt-instead-of-md-using-cmake
https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT -d2FH4-")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd -d2FH4-")
set(CMAKE_CXX_STANDARD 17)
add_link_options("-d2:-FH4-")
MY CHANGES END
elseif(APPLE OR LINUX)
set(SENTRY_DEFAULT_TRANSPORT "curl")
else()
set(SENTRY_DEFAULT_TRANSPORT "none")
endif()
Using Power Shell from the right folder:
cmake . -DBUILD_SHARED_LIBS=OFF
This builds the debug version by default
cmake --build . --parallel
build the Release version using Visual Studio 2019 directly
and built the sentry .sln file in release mode after that made a project in cpp then tried including sentry to it but it says "No such directory" for sentry or issues with sentry.h library....how to resolve it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions