QuantLib with Xcode 7.2.1 on OS X Yosemite

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

QuantLib with Xcode 7.2.1 on OS X Yosemite

Oleg Sokolinskiy
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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib with Xcode 7.2.1 on OS X Yosemite

Oleg Sokolinskiy
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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib with Xcode 7.2.1 on OS X Yosemite

Luigi Ballabio

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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib with Xcode 7.2.1 on OS X Yosemite

Oleg Sokolinskiy
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
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib with Xcode 7.2.1 on OS X Yosemite

Luigi Ballabio
Hello Oleg,
    I don't get those warnings with either gcc or clang. It might have to do with your compiler settings. Try sending some of the errors with file and line information. As far as dates are concerned, they should be harmless, though.

Luigi


On Sat, Oct 29, 2016 at 9:47 PM Oleg Sokolinskiy <[hidden email]> wrote:
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


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: QuantLib with Xcode 7.2.1 on OS X Yosemite

Oleg Sokolinskiy
Dear Luigi,


Here is a sample of warnings that I get:
(the ones that I omitted are of the same kind, but in different places in the listed .hpp files):


/usr/local/include/ql/time/date.hpp:366:30: Implicit conversion loses integer precision: 'long' to 'Day' (aka 'int')

/usr/local/include/ql/cashflows/conundrumpricer.hpp:95:18: Implicit conversion loses integer precision: 'Size' (aka 'unsigned long') to 'const int'

/usr/local/include/ql/math/integrals/gaussianquadratures.hpp:55:37: Implicit conversion loses integer precision: 'unsigned long' to 'Integer' (aka 'int')

/usr/local/include/ql/experimental/math/multidimquadrature.hpp:57:36: Implicit conversion loses integer precision: 'unsigned long' to 'Integer' (aka 'int')

/usr/local/include/ql/math/distributions/binomialdistribution.hpp:36:30: Implicit conversion loses integer precision: 'BigNatural' (aka 'unsigned long') to 'Natural' (aka 'unsigned int')
/usr/local/include/ql/math/distributions/binomialdistribution.hpp:36:65: Implicit conversion loses integer precision: 'unsigned long' to 'Natural' (aka 'unsigned int')

/usr/local/include/ql/experimental/credit/onefactorcopula.hpp:227:37: Implicit conversion loses integer precision: 'Size' (aka 'unsigned long') to 'int'

/usr/local/include/ql/math/distributions/poissondistribution.hpp:104:43: Implicit conversion loses integer precision: 'BigNatural' (aka 'unsigned long') to 'Natural' (aka 'unsigned int')

/usr/local/include/boost/archive/basic_archive.hpp:154:57: Implicit conversion loses integer precision: 'const std::size_t' (aka 'const unsigned long') to 'base_type' (aka 'unsigned int')

/usr/local/include/ql/experimental/math/hybridsimulatedannealingfunctors.hpp:71:36: Implicit conversion loses integer precision: 'unsigned long' to 'const unsigned int'


/usr/local/include/ql/experimental/math/particleswarmoptimization.hpp:260:42: Implicit conversion loses integer precision: 'unsigned long' to 'const unsigned int'

/usr/local/include/ql/math/optimization/leastsquare.hpp:131:45: Implicit conversion loses integer precision: 'Size' (aka 'unsigned long') to 'Integer' (aka 'int')

/usr/local/include/ql/math/randomnumbers/ranluxuniformrng.hpp:50:52: Implicit conversion loses integer precision: 'Size' (aka 'unsigned long') to 'const boost::uint32_t' (aka 'const unsigned int')

/usr/local/include/ql/experimental/credit/inhomogeneouspooldef.hpp:149:27: Implicit conversion loses integer precision: 'const Size' (aka 'const unsigned long') to 'int'
/usr/local/include/ql/experimental/credit/inhomogeneouspooldef.hpp:164:33: Implicit conversion loses integer precision: 'Size' (aka 'unsigned long') to 'int'

/usr/local/include/ql/experimental/math/fireflyalgorithm.hpp:213:45: Implicit conversion loses integer precision: 'unsigned long' to 'const unsigned int'

/usr/local/include/ql/methods/finitedifferences/stepcondition.hpp:65:44: Implicit conversion loses integer precision: 'Size' (aka 'unsigned long') to ‘int'



Thank you very much for your advice!
Best wishes,
Oleg



On Nov 10, 2016, at 10:56 AM, Luigi Ballabio <[hidden email]> wrote:

Hello Oleg,
    I don't get those warnings with either gcc or clang. It might have to do with your compiler settings. Try sending some of the errors with file and line information. As far as dates are concerned, they should be harmless, though.

Luigi


On Sat, Oct 29, 2016 at 9:47 PM Oleg Sokolinskiy <[hidden email]> wrote:
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



------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users