Discussion:
[Quantlib-users] Linkage errors against QL under Xcode 8.3.1
Amine Ifri
2017-05-25 20:33:18 UTC
Permalink
Hi. I have been advised my first email is too large. Managed to copy/paste the error messages and resend. Thanks for your help!

Best Regards,
Amine
Hello QL community,
Undefined symbols for architecture x86_64:
"QuantLib::Date::Date(boost::posix_time::ptime const&)", referenced from:
src::FileUtilities::assetfixings<double>::read(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const in MainEntryMenu.o
"QuantLib::operator==(QuantLib::Date const&, QuantLib::Date const&)", referenced from:
src::FileUtilities::assetfixings<double>::read(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const in MainEntryMenu.o
"QuantLib::operator<(QuantLib::Date const&, QuantLib::Date const&)", referenced from:
std::__1::__tree_node_base<void*>*& std::__1::__tree<std::__1::__value_type<QuantLib::Date, double>, std::__1::__map_value_compare<QuantLib::Date, std::__1::__value_type<QuantLib::Date, double>, std::__1::less<QuantLib::Date>, true>, std::__1::allocator<std::__1::__value_type<QuantLib::Date, double> > >::__find_equal<QuantLib::Date>(std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>*&, QuantLib::Date const&) in MainEntryMenu.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Note that I have set up the correct QL Preprocessor flag to use the specific constructors QL::Date(const boost::posix_time::time& ). I am using the standard library libc++ and gnu++0X as a compiler. I have successfully built the other project on Eclipse in the past, but for some reason I can’t get it to build using Xcode.
Your help is much appreciated.
Thanks
Amine
CK TUNG
2017-05-27 08:00:32 UTC
Permalink
either your library does not have the required x86_64 architecture or you did not link the it properly in xcode.

For xcode, it is better to use framework.
Post by Amine Ifri
Hi. I have been advised my first email is too large. Managed to copy/paste the error messages and resend. Thanks for your help!
Best Regards,
Amine
Hello QL community,
src::FileUtilities::assetfixings<double>::read(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const in MainEntryMenu.o
src::FileUtilities::assetfixings<double>::read(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const in MainEntryMenu.o
std::__1::__tree_node_base<void*>*& std::__1::__tree<std::__1::__value_type<QuantLib::Date, double>, std::__1::__map_value_compare<QuantLib::Date, std::__1::__value_type<QuantLib::Date, double>, std::__1::less<QuantLib::Date>, true>, std::__1::allocator<std::__1::__value_type<QuantLib::Date, double> > >::__find_equal<QuantLib::Date>(std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>*&, QuantLib::Date const&) in MainEntryMenu.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Note that I have set up the correct QL Preprocessor flag to use the specific constructors QL::Date(const boost::posix_time::time& ). I am using the standard library libc++ and gnu++0X as a compiler. I have successfully built the other project on Eclipse in the past, but for some reason I can¡Št get it to build using Xcode.
Your help is much appreciated.
Thanks
Amine
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Luigi Ballabio
2017-05-29 13:18:23 UTC
Permalink
Just to check:
- how did you set the preprocessor flag? Did you do it when compiling both
the library and your project?
- how are you adding QuantLib to your project?

Luigi
Post by CK TUNG
either your library does not have the required x86_64 architecture or you
did not link the it properly in xcode.
For xcode, it is better to use framework.
Hi. I have been advised my first email is too large. Managed to copy/paste
the error messages and resend. Thanks for your help!
Best Regards,
Amine
Hello QL community,
I am working using Xcode 8.3.1 where I have successfully built Quantlib as
a dynamic lib. I have also started a small project on the side where I use
src::FileUtilities::assetfixings<double>::read(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&, std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >) const in
MainEntryMenu.o
src::FileUtilities::assetfixings<double>::read(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&, std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >) const in
MainEntryMenu.o
std::__1::__tree_node_base<void*>*&
std::__1::__tree<std::__1::__value_type<QuantLib::Date, double>,
std::__1::__map_value_compare<QuantLib::Date,
std::__1::__value_type<QuantLib::Date, double>,
std::__1::less<QuantLib::Date>, true>,
std::__1::allocator<std::__1::__value_type<QuantLib::Date, double> >
Post by Amine Ifri
::__find_equal<QuantLib::Date>(std::__1::__tree_end_node<std::__1::__tree_node_base<void*>*>*&,
QuantLib::Date const&) in MainEntryMenu.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Note that I have set up the correct QL Preprocessor flag to use the
specific constructors QL::Date(const boost::posix_time::time& ). I am using
the standard library libc++ and gnu++0X as a compiler. I have successfully
built the other project on Eclipse in the past, but for some reason I can’t
get it to build using Xcode.
Your help is much appreciated.
Thanks
Amine
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
https://lists.sourceforge.net/lists/listinfo/quantlib-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Loading...