I was able to compile and build frameworks for boost and quantlib on Xcode 4.6 and iOS 6.1 (and armv7s!):
- boost - used boostoniphone-galbraithjosephs script, modified to ios 6.1 and increase 1_53_0 (thanks, Joseph!)
- quantlib - used Philip Barnes script with my changes for ios 6.1 and quantlib 1.2.1 (thanks to Philip!)
When I run FXVanillaSwapExample in Xcode (which uses both boost.framework and ql.framework), I get 56 warnings and 2 errors, mainly related to: ld: warning: direct access in xyz to the global weak character vtable for xyz means that a weak character cannot be redefined at run time. This is probably due to the fact that different translation units were compiled with different visibility settings. as well as ld: warning: direct access to QuantLib :: RecoveryRateQuote :: value () const for the global weak QuantLib character
I got these warnings for Quantlib and boost. Then I read the SO posts on the visibility settings.
boost was compiled script with -fvisibility = hidden -fvisibility-inlines-hidden quantlib was compiled with -fvisibility = hidden but not -fvisibility-inlines-hidden
I modified the quantile script to add -fvisibility-inlines-hidden, and then rebuilt it all to no avail. The same linker errors.
I also tried playing with "Inline Methods Hidden" and "Symbols Hidden by Default" in the Xcode build settings (they should set the same -f flags backstage)
So, I tried rebuilding boost and quantlib with -fvisibility = default and removing the -fvisibility-inlines-hidden flag. That didn't work either. Similar linker errors occur again when creating FXVanillaSwapExample.
So, I assume that I am not configuring the assemblies properly and somewhere inside the -f flag assembly I got confused. I just donβt know how to diagnose how this happens. Ideas appreciated.
source share