nuclph
September 29th, 2009, 10:24 AM
Hello All,
I do have unmanaged c++ library from which I would like to expose several classes to .NET environment. Everything working except function which is dependent on singleton pattern. Then, if i am exposing class with implementation in hpp file - everything working and I can create instance in C# of managed wrapper. If I have implementation separated in cpp file - than I am getting strange exception in C# test console application : "The exception unknown software exception (0x0020001) occurred in the application"
This is a link where we discussing this problem in more details :
http://www.nabble.com/Settings::instance%28%29.evaluationDate%28%29-produces-exception-in-managed-code-td25479768.html
I though that maybe .NET experts can suggest what could be a problem. I am using visual studio 2008.
Below, three simple project to show a problem :
1. QLib : static unmanaged c++ lib with minimum files from quantlib to be able to use settings/singleton
http://depositfiles.com/files/m9t6p9ipw
2. WrapperQlib : will generate managed C++ library to wrap testsettings class from QLib
http://depositfiles.com/files/b0edhbp8j
3. WrapperTestQlib : C# console application to test testsettingsmanaged class.
http://depositfiles.com/files/8zq2d83ef
I would be very glad if someone has suggestions.
Thank you,
Boris.
I do have unmanaged c++ library from which I would like to expose several classes to .NET environment. Everything working except function which is dependent on singleton pattern. Then, if i am exposing class with implementation in hpp file - everything working and I can create instance in C# of managed wrapper. If I have implementation separated in cpp file - than I am getting strange exception in C# test console application : "The exception unknown software exception (0x0020001) occurred in the application"
This is a link where we discussing this problem in more details :
http://www.nabble.com/Settings::instance%28%29.evaluationDate%28%29-produces-exception-in-managed-code-td25479768.html
I though that maybe .NET experts can suggest what could be a problem. I am using visual studio 2008.
Below, three simple project to show a problem :
1. QLib : static unmanaged c++ lib with minimum files from quantlib to be able to use settings/singleton
http://depositfiles.com/files/m9t6p9ipw
2. WrapperQlib : will generate managed C++ library to wrap testsettings class from QLib
http://depositfiles.com/files/b0edhbp8j
3. WrapperTestQlib : C# console application to test testsettingsmanaged class.
http://depositfiles.com/files/8zq2d83ef
I would be very glad if someone has suggestions.
Thank you,
Boris.