Hello, I am trying to build a simple DLL for Excel that uses QuantLib with MinGW on Windows 7. The DLL exports simple C functions using the following statements: extern "C" __declspec(dllexport) __stdcall double some_function(). QuantLib objects are used inside these functions. I was able to use some objects with success until I tried template classes, like InterpolatedZeroCurve<Interpolator>. The code build successfully, but when I ran it in Excel I get the following error: "Microsoft Visual C++ Runtime Library: This application has requested the Runtime to terminate it in an unusual way. Please contact the applications support team for more information". The same function works if I test it through a simple command line application. Also, I verified dependencies with Dependency Walker and everything is fine. I would appreciate very much any help or explanation regarding this behaviour. Thanks very much, -- Lucas Lorenzi Ingles
------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
I forgot to mention that I am accessing the DLL via VBA using the "Declare" statement. Thanks very much, Em 24/08/2015 23:32, "Lucas Ingles" <[hidden email]> escreveu:
------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hello,
What does the function look like? When it crashes under Excel, are you sure the inputs are the same as the successful execution outside of Excel? Have you tried debugging it? Kind Regards, Eric On Tue, 25 Aug 2015 07:47:42 -0300 Lucas Ingles <[hidden email]> wrote: > I forgot to mention that I am accessing the DLL via VBA using the > "Declare" statement. > > Thanks very much, > Lucas > Em 24/08/2015 23:32, "Lucas Ingles" <[hidden email]> > escreveu: > > > Hello, > > > > I am trying to build a simple DLL for Excel that uses QuantLib with > > MinGW on Windows 7. The DLL exports simple C functions using the > > following statements: > > extern "C" __declspec(dllexport) __stdcall double some_function(). > > QuantLib objects are used inside these functions. I was able to use > > some objects with success until I tried template classes, like > > InterpolatedZeroCurve<Interpolator>. The code build successfully, > > but when I ran it in Excel I get the following error: > > "Microsoft Visual C++ Runtime Library: This application has > > requested the Runtime to terminate it in an unusual way. Please > > contact the applications support team for more information". > > The same function works if I test it through a simple command line > > application. Also, I verified dependencies with Dependency Walker > > and everything is fine. > > I would appreciate very much any help or explanation regarding this > > behaviour. > > > > Thanks very much, > > -- > > Lucas Lorenzi Ingles > > > ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Eric, sorry for the late response. Thanks very much for the ideas. In fact, the inputs of the successful execution outside Excel (simple fake data), were different from the Excel inputs (real market curves).2015-08-25 9:43 GMT-03:00 Eric Ehlers <[hidden email]>: Hello, -- Lucas Lorenzi Ingles
------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |