I have downloaded and built QuantLib (search google for quantlib and check install link) from their website in visual studio 2010. But because my knowledge of C++ is kind of minimal I would like to use SWIG so I can call the QuantLib libraries with C#. After the SWIG conversion I get a proper build. I thought this would run but at runtime I get the following error on multiple locations in the C# classes:
- PInvokeStackImbalance was detected
A call to PInvoke function 'NQuantLib!QuantLib.NQuantLibcPINVOKE::new_Date__SWIG_1' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
I think that this is a general error so please let me know how to fix this?