开发者

c#/wpf OpenMP inside external dll

开发者 https://www.devze.com 2023-03-04 20:25 出处:网络
I have some c++ lib, a \'glue\' lib in managed c++ and C#/WPF app importing the \'glue\' lib. Everything works fine till I add some

I have some c++ lib, a 'glue' lib in managed c++ and C#/WPF app importing the 'glue' lib. Everything works fine till I add some

#pragma omp parallel for

When I compile my c++ lib / glue lib and c#/wpf app everything is fine - no warnings/errors. But when I 开发者_StackOverflow社区trie to launch c# app it crashes - BUT it doesnt crashes when executing some parallel code - it crashes during the loading of app - It says:

A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll

Additional information: Nie można utworzyć wystąpienia „Window1” zdefiniowanego w zestawie „fastnn-speedTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”. Obiekt docelowy wywołania zgłosił wyjątek. Błąd w pliku znaczników „fastnn-speedTest;component/Window1.xaml”.

I know it's in polish but obviously c# app just can't load dll which uses OpenMP code - how I can make it work?

Of course in my c++ project I switched on "Enable OpenMP"


.NET doesn’t care what your DLL does—One using OpenMP shouldn’t be any different. Do you have the required vcomp*.dll (vcomp100.dll for VS2010) in your path?

It is throwing a XamlParseException, are you 100% sure it’s not your XAML that’s broken?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号