Re: Problem on QuantLib with /Clr support enabled

Posted by Nathan Abbott on
URL: http://quantlib.414.s1.nabble.com/Problem-on-QuantLib-with-Clr-support-enabled-tp5783p5786.html

No I did not do any thing different. The confusion is that I compile the QuantLib natively or unmanaged then I link it to a C++ class that is compile under the /clr flag.  For this to work, the inline must be inserted when I compile with the /clr is turn on and when the /clr is turn off. My suggestion is that you changed the singelton.hpp to something like thus.

#if defined(QL_PATCH_MSVC)
inline  // this seems to be required when CLR support is enabled
#endif

On Mon, Mar 3, 2008 at 10:53 AM, Luigi Ballabio <[hidden email]> wrote:

On Mar 3, 2008, at 6:26 PM, Nathan Abbott wrote:
> I just tested the EquityOption project of QuantLib 0.9.0 with Boost
> 1.34.1 and Visual C++ 2005. The project works with both the \clr
> support on and off. My suggestion is that you comment lines 69 and 71
> in the singleton.hpp file.
>  For example.
>
> //#if defined(QL_PATCH_MSVC) && defined(_MANAGED)
> inline  // this seems to be required when CLR support is enabled
>  //#endif

Nathan,
       did you get any different behavior after commenting the #ifdef?
It sounds strange, since the /clr option defines _MANAGED, so the
inline should be preprocessed anyway.

Luigi



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users