Thank you for the input.
We chose to use a clr dll because we can easily instantiate objects and
don't need the "old" dllimport and dllexport syntax.
As we already put a lot of effort in this dll I don't think I couldn't
rewrite everything.
Best regards,
Markus
Gesendet mit AquaMail für Android
http://www.aqua-mail.com
Am 12. Juni 2015 17:16:18 schrieb Damien
On 2015-06-12 1:09 AM, Markus Pieper wrote:
Hi there,
I´m new to boost so this might be a silly question.
We have a simulation that is written in C++ and compiled as a static lib. It uses a few boost (v1.56) functions like thread.
My job is to create a WPF GUI, that uses this lib. For that, I created a C++ CLR DLL which interacts as a wrapper between .NET GUI and the unmanaged libs.
Everything works fine but closing my program results in a crash. This crash is described here: http://stackoverflow.com/questions/8144630/mixed-mode-c- cli-dll-throws-exception-on-exit And someone replied, that the reason for this lies in the exception_ptr.hpp beacause a "static exception_ptr ep" is being used instead of "exception_ptr ep". When I delete the static attribute, my program ends normally without the crash.
My understanding of C++ is not that big, so I can´t say why it crashes here. But the boost programmers have a reason to do so.
I also followed These advices (http://thread.gmane.org/gmane.comp.lib.boost.user/44515) but with no further luck.
Best regards, Markus _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
I'd like to make a suggestion based on experience. I've had to do exactly what you're describing and build a WPF UI on a C++ simulation application. Use .Net's System.Runtime.InteropServices with DllImport and wrap your C++ lib in a plain C DLL. It doesn't take as long as you might think but it is more work. You'll have better separation of responsibilities and it doesn't prevent the use of Boost.
Damien _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users