Re: Linkage errors against QL under Xcode 8.3.1

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

Re: Linkage errors against QL under Xcode 8.3.1

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

On 25 May 2017, at 21:22, Amine Ifri <[hidden email]> wrote:

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 QL and when trying to link against it, I get the following linking messages:


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




------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Linkage errors against QL under Xcode 8.3.1

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.

Amine Ifri <[hidden email]> 於 2017年5月26日 上午4:33 寫道:

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

On 25 May 2017, at 21:22, Amine Ifri <[hidden email]> wrote:

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 QL and when trying to link against it, I get the following linking messages:


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



------------------------------------------------------------------------------
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Linkage errors against QL under Xcode 8.3.1

Luigi Ballabio
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


On Sat, May 27, 2017 at 10:04 AM CK TUNG <[hidden email]> wrote:
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.

Amine Ifri <[hidden email]> 於 2017年5月26日 上午4:33 寫道:

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

On 25 May 2017, at 21:22, Amine Ifri <[hidden email]> wrote:

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 QL and when trying to link against it, I get the following linking messages:


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



------------------------------------------------------------------------------
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
[hidden email]
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users