Skip to content

Windows 10 Store App - C++ - how to configure project to use Sentry crash reporting? #170

Closed

Description

Hi!

Now that you've just released updated the Native / C++ version (thanks!), I've been able to download it, install Make for Windows 10, and start trying to integrate with one of my C++ projects for Windows 10.

  1. I've run cmake like this (please note that it wasn't clear that this is how it needs to be run for Windows 10 native - I hope it is correct!)

cmake . -DBUILD_SHARED_LIBS=OFF

  1. I've updated my C++ project to include calls as per your documentation (note use of extern "C", which I presume is correct):

extern "C" {
#include <sentry.h>
}

int main(void) {
...
sentry_options_t *options = sentry_options_new();
sentry_options_set_dsn(options, "https://blah/blah");
sentry_init(options);

/* ... */

// make sure everything flushes
sentry_shutdown();
}

  1. I've updated my project to import the same .lib files that your test project (sentry_example) uses, including sentry.lib (and all the other ones).

  2. However, I'm getting this:

1>Main.obj : error LNK2001: unresolved external symbol __imp_sentry_value_new_message_event
1>Main.obj : error LNK2001: unresolved external symbol __imp_sentry_init
1>Main.obj : error LNK2001: unresolved external symbol __imp_sentry_shutdown
1>Main.obj : error LNK2001: unresolved external symbol __imp_sentry_options_set_dsn
1>Main.obj : error LNK2001: unresolved external symbol __imp_sentry_capture_event
1>Main.obj : error LNK2001: unresolved external symbol __imp_sentry_options_new
1>C:...blah...\myapp.exe : fatal error LNK1120: 6 unresolved externals

Can you please advise?

Pete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions