Login  Register

Re: QuantLib with Xcode 7.2.1 on OS X Yosemite

Posted by Oleg Sokolinskiy on Oct 29, 2016; 6:22pm
URL: http://quantlib.414.s1.nabble.com/QuantLib-with-Xcode-7-2-1-on-OS-X-Yosemite-tp17836p17839.html

Dear Luigi,

Thank you very much! It worked beautifully!

C++ Language Dialect: Compiler Default.

Just one follow up question. I am getting multiple implicit conversion warnings.
I know that QuantLib defines its own types, but I am not sure whether I can ignore the “loses * precision" warnings.
For example, in “date.hpp”, I get
“Implicit conversion loses integer precision: ‘long’ to ‘Day’ (aka ‘int’)”
Similar warnings, for Size, unsigned long, BigNatural, … 
Is this normal or is it caused by my choice of C++ language dialect?

Thank you once again for your excellent advice!
Best wishes,
Oleg


On Oct 29, 2016, at 3:28 PM, Luigi Ballabio <[hidden email]> wrote:

Try not asking for the C++11 dialect.


On Sat, Oct 29, 2016, 21:23 Oleg Sokolinskiy <[hidden email]> wrote:
Just a small addition to “QuantLib with Xcode 7.2.1 on OS X Yosemite":

I tried both
-lQuantLib and libQuantLib (lowercase l and lib) - just trying everything :)

Thanks once again!

Best wishes,
Oleg



> On Oct 29, 2016, at 3:06 PM, Oleg Sokolinskiy <[hidden email]> wrote:
>
> Dear QuantLib community,
>
> I would like to use QuantLib with Xcode 7.2.1 IDE on OS X Yosemite.
>
> First, I need to mention that
> g++ -O2 -stdlib=libstdc++ -mmacosx-version-min=10.6 -I/usr/local/include/ -I/usr/local/include/boost BermudanSwaption.cpp -o bermudanswaption -L/usr/local/lib/ -lQuantLib
> works great and results in a working program.
>
> My problems are with integrating QuantLib and Xcode. Here is what I do:
>
> (0) #include <ql/quantlib.hpp> in the code
>
> (1) Build Settings. (My Boost is “homebrewed” and is in /usr/local/)
> Header search paths: /usr/local/include        /usr/local/include/boost
> Library search paths: /usr/local/lib
>
> C++ Standard Library: libstdc++ (GNU C++ standard library)
> C++ Language Dialect:  GNU++ 11 (-std=gnu++11)
>
> Apple LLVM 7.0 - Custom Compiler Flags: Other C++ Flags: -mmacosx-version-min=10.6  (just typing that into the relevant cell)
>
> Linking: Other Linker Flags: -IQuantLib (this was done following a previous post regarding linking with Xcod, as suggested by bo.zhao on Aug 11, 2014)
>
>
> (2)  Build Phases: Link Binary With Libraries: libQuantLib.0.dylib  (also tried the static libQuantLib.a)
>
>
> The following ERROR output is repeated multiple times:
> “No template named ‘forward’ in namespace ‘std’, did you mean simply ‘forward'
>
> /usr/local/include/ql/quantlib.hpp:43:10: In file included from /usr/local/include/ql/quantlib.hpp:43:
>
> /usr/local/include/ql/experimental/all.hpp:11:10: In file included from /usr/local/include/ql/experimental/all.hpp:11:
>
> /usr/local/include/ql/experimental/credit/all.hpp:4:10: In file included from /usr/local/include/ql/experimental/credit/all.hpp:4:
>
> /usr/local/include/ql/experimental/credit/basecorrelationlossmodel.hpp:32:10: In file included from /usr/local/include/ql/experimental/credit/basecorrelationlossmodel.hpp:32:
>
> /usr/local/include/ql/experimental/credit/gaussianlhplossmodel.hpp:29:10: In file included from /usr/local/include/ql/experimental/credit/gaussianlhplossmodel.hpp:29:
>
> /usr/local/include/ql/experimental/math/latentmodel.hpp:23:10: In file included from /usr/local/include/ql/experimental/math/latentmodel.hpp:23:
>
> /usr/local/include/ql/experimental/math/multidimquadrature.hpp:25:10: In file included from /usr/local/include/ql/experimental/math/multidimquadrature.hpp:25:
>
> /usr/local/include/boost/bind.hpp:22:10: In file included from /usr/local/include/boost/bind.hpp:22:
>
> /usr/local/include/boost/move/utility_core.hpp:248:37: 'forward' declared here
>
>
> Thank you in advance for your help!
> And I hope that my question would be helpful to other users of Xcode and QuantLib.
> Best wishes,
> Oleg
>


------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users