Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for exceptions #31

Open
mottosso opened this issue May 10, 2020 · 2 comments
Open

Support for exceptions #31

mottosso opened this issue May 10, 2020 · 2 comments

Comments

@mottosso
Copy link

Hi @crosire,

This isn't a bug report, I just wanted to document that exceptions don't appear to be supported by blink (?)

I'm initially had issues with VS2019 but luckily found #30 which got me half-way there, except the default "Console Application" preset in VS comes with exceptions enabled, which prompts the following error.

Unresolved external symbol '?uncaught_exception@std@@YA_NXZ'.
Full output
$ blink.exe ConsoleApplication1.exe
Launching in target application ...
  Entry point was written to address 000001B91B9D0000
Reading PE import directory ...
Reading PE debug info directory ...
  Found program debug database: C:\Users\marcus\source\repos\ConsoleApplication1\x64\Debug\ConsoleApplication1.pdb
  Found source file: C:\Users\marcus\source\repos\ConsoleApplication1\ConsoleApplication1.cpp
Starting compiler process ...
  Started process with PID 14996
Starting file system watcher for 'C:\Users\marcus\source\repos\ConsoleApplication1' ...
Detected modification to: C:\Users\marcus\source\repos\ConsoleApplication1\ConsoleApplication1.cpp
ConsoleApplication1.cpp
Finished compiling "C:\Users\marcus\source\repos\ConsoleApplication1\ConsoleApplication1.temp.obj" with code 0.
Unresolved external symbol '?uncaught_exception@std@@YA_NXZ'.
The target application has exited with code 3221225786.
^C

Initially I suspected that maybe blink needs to be built with exceptions in order to support it, but it already was. Turning off C++ exceptions for the console application solved it.

image

@crosire
Copy link
Owner

crosire commented May 16, 2020

Exceptions themselves should not be a problem. But VC++ 2019 (in contrast to 2017) isn't working particularly well out of the box with blink, because of the reason noted in #30. You'll likely have to set up a compiler command-line matching your project here and rebuild blink:

cmdline = "cl.exe "

@mottosso
Copy link
Author

It all boils down to 2019. Can't make any promises, but I'll see if there's anything I could do to resolve this. Blink has been fantastic so far, despite the minor issues so thanks for that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants