discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash occurs when catching std::exception in Objective-C++ code comp


From: Lobron, David
Subject: Re: Crash occurs when catching std::exception in Objective-C++ code compiled with clang on Linux and using libobjc2
Date: Fri, 17 Nov 2017 18:31:26 +0000

> You’ll need to also link with libstdc++.  Using g++ or clang++ instead of gcc 
> / clang will do the right thing.

Thank you!  I added -lobjcxx -lstdc++ and -L.. to the link command.  That fixed 
the build issues, and I was able to run the tests.  All of the tests pass now, 
including the exception tests:

44/46 Test #44: MethodArguments_optimised ..............   Passed    0.00 sec
      Start 45: CXXExceptions
45/46 Test #45: CXXExceptions ..........................   Passed    0.00 sec
      Start 46: CXXExceptions_optimised
46/46 Test #46: CXXExceptions_optimised ................   Passed    0.00 sec

100% tests passed, 0 tests failed out of 46

Could you suggest the best way to apply this fix to the libobjc2 library as a 
whole?  I can use patch or the like to update makefiles or cmake lists as 
needed.  Once that is done, I will try a rebuild of my original program, and 
see if this fixes the exception crashes.

Thank you again!

--David

reply via email to

[Prev in Thread] Current Thread [Next in Thread]