我的Mac版本是10.11.5(El Capitan),在终端上运行C ++ 11没有问题。
我完全遵循了Quantlib官方网页中所示的指南:http://quantlib.org/install/macosx.shtml(我使用macport安装boost 1.59.0,并从quantlib.org下载了quantlib v1.8)
但是,当我尝试运行示例代码时:
cd Examples/BermudanSwaption
g++ -I/opt/local/include/ -I/opt/local/include/boost BermudanSwaption.cpp -o bermudanswaption -L/opt/local/lib/ -lQuantLib
按照指南的建议,我遇到了一长串错误消息:
Undefined symbols for architecture x86_64:
"QuantLib::MultiStepSwap::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::MultiStepSwap in BermudanSwaption-032f83.o
"QuantLib::ExerciseAdapter::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::ExerciseAdapter in BermudanSwaption-032f83.o
"QuantLib::OneStepForwards::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::OneStepForwards in BermudanSwaption-032f83.o
"QuantLib::BermudanExercise::BermudanExercise(std::__1::vector<QuantLib::Date, std::__1::allocator<QuantLib::Date> > const&, bool)", referenced from:
_main in BermudanSwaption-032f83.o
"QuantLib::MultiStepNothing::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::MultiStepNothing in BermudanSwaption-032f83.o
"QuantLib::MultiStepRatchet::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::MultiStepRatchet in BermudanSwaption-032f83.o
"QuantLib::MultiStepForwards::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::MultiStepForwards in BermudanSwaption-032f83.o
"QuantLib::MultiStepSwaption::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::MultiStepSwaption in BermudanSwaption-032f83.o
"QuantLib::OneStepOptionlets::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::OneStepOptionlets in BermudanSwaption-032f83.o
"QuantLib::MultiStepOptionlets::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::MultiStepOptionlets in BermudanSwaption-032f83.o
"QuantLib::OneStepCoinitialSwaps::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::OneStepCoinitialSwaps in BermudanSwaption-032f83.o
"QuantLib::OneStepCoterminalSwaps::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::OneStepCoterminalSwaps in BermudanSwaption-032f83.o
"QuantLib::MultiStepCoinitialSwaps::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::MultiStepCoinitialSwaps in BermudanSwaption-032f83.o
"QuantLib::MultiStepInverseFloater::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::MultiStepInverseFloater in BermudanSwaption-032f83.o
"QuantLib::MultiStepCoterminalSwaps::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::MultiStepCoterminalSwaps in BermudanSwaption-032f83.o
"QuantLib::MultiStepCoterminalSwaptions::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::MultiStepCoterminalSwaptions in BermudanSwaption-032f83.o
"QuantLib::MultiStepPeriodCapletSwaptions::nextTimeStep(QuantLib::CurveState const&, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, std::__1::vector<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> >, std::__1::allocator<std::__1::vector<QuantLib::MarketModelMultiProduct::CashFlow, std::__1::allocator<QuantLib::MarketModelMultiProduct::CashFlow> > > >&)", referenced from:
vtable for QuantLib::MultiStepPeriodCapletSwaptions in BermudanSwaption-032f83.o
"QuantLib::Error::Error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, long, 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&)", referenced from:
QuantLib::DiscretizedOption::reset(unsigned long) in BermudanSwaption-032f83.o
QuantLib::Instrument::setupArguments(QuantLib::PricingEngine::arguments*) const in BermudanSwaption-032f83.o
QuantLib::Option::setupArguments(QuantLib::PricingEngine::arguments*) const in BermudanSwaption-032f83.o
QuantLib::Payoff::accept(QuantLib::AcyclicVisitor&) in BermudanSwaption-032f83.o
QuantLib::SimpleQuote::value() const in BermudanSwaption-032f83.o
QuantLib::BlackVolTermStructure::accept(QuantLib::AcyclicVisitor&) in BermudanSwaption-032f83.o
QuantLib::Handle<QuantLib::Quote>::operator->() const in BermudanSwaption-032f83.o
...
"QuantLib::detail::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, QuantLib::detail::percent_holder const&)", referenced from:
calibrateModel(boost::shared_ptr<QuantLib::ShortRateModel> const&, std::__1::vector<boost::shared_ptr<QuantLib::CalibrationHelper>, std::__1::allocator<boost::shared_ptr<QuantLib::CalibrationHelper> > > const&) in BermudanSwaption-032f83.o
_main in BermudanSwaption-032f83.o
"QuantLib::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, QuantLib::Date const&)", referenced from:
QuantLib::InterestRateIndex::valueDate(QuantLib::Date const&) const in BermudanSwaption-032f83.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我不知道是怎么回事。谁能帮助我了解如何解决?
非常感谢!
根据Mark的建议,/ opt / local中的目录列表为:
total 421544
drwxr-xr-x 12 root admin 408 Jun 16 22:05 db48
drwxr-xr-x 14 root admin 476 Jun 16 22:05 engines
drwxr-xr-x 7 root admin 238 Jun 16 22:05 gettext
drwxr-xr-x 6 root admin 204 Jun 16 22:05 icu
-rwxr-xr-x 1 root admin 34927800 Jun 17 00:03 libQuantLib.0.dylib
-rw-r--r-- 1 root admin 73890632 Jun 17 00:03 libQuantLib.a
lrwxr-xr-x 1 root admin 19 Jun 17 00:03 libQuantLib.dylib -> libQuantLib.0.dylib
-rwxr-xr-x 1 root admin 975 Jun 17 00:03 libQuantLib.la
-rwxr-xr-x 1 root admin 13740 Jun 16 06:43 libasprintf.0.dylib
-rw-r--r-- 1 root admin 3952 Jun 16 06:43 libasprintf.a
lrwxr-xr-x 1 root admin 19 Jun 16 06:43 libasprintf.dylib -> libasprintf.0.dylib
-rwxr-xr-x 1 root admin 10144 Jan 30 01:20 libboost_atomic-mt.dylib
-rw-r--r-- 1 root admin 263712 Jan 30 01:21 libboost_chrono-mt.a
-rwxr-xr-x 1 root admin 25784 Jan 30 01:20 libboost_chrono-mt.dylib
-rwxr-xr-x 1 root admin 60520 Jan 30 01:20 libboost_container-mt.dylib
-rwxr-xr-x 1 root admin 54368 Jan 30 01:20 libboost_context-mt.dylib
-rwxr-xr-x 1 root admin 63796 Jan 30 01:20 libboost_coroutine-mt.dylib
-rwxr-xr-x 1 root admin 76456 Jan 30 01:21 libboost_date_time-mt.dylib
-rw-r--r-- 1 root admin 3832 Jan 30 01:21 libboost_exception-mt.a
-rwxr-xr-x 1 root admin 123140 Jan 30 01:21 libboost_filesystem-mt.dylib
-rwxr-xr-x 1 root admin 502616 Jan 30 01:21 libboost_graph-mt.dylib
-rwxr-xr-x 1 root admin 155336 Jan 30 01:21 libboost_iostreams-mt.dylib
-rwxr-xr-x 1 root admin 1114060 Jan 30 01:21 libboost_locale-mt.dylib
-rwxr-xr-x 1 root admin 1244756 Jan 30 01:21 libboost_log-mt.dylib
-rwxr-xr-x 1 root admin 1651560 Jan 30 01:21 libboost_log_setup-mt.dylib
-rwxr-xr-x 1 root admin 162264 Jan 30 01:21 libboost_math_c99-mt.dylib
-rwxr-xr-x 1 root admin 117984 Jan 30 01:22 libboost_math_c99f-mt.dylib
-rwxr-xr-x 1 root admin 125540 Jan 30 01:22 libboost_math_c99l-mt.dylib
-rwxr-xr-x 1 root admin 660412 Jan 30 01:21 libboost_math_tr1-mt.dylib
-rwxr-xr-x 1 root admin 671312 Jan 30 01:21 libboost_math_tr1f-mt.dylib
-rwxr-xr-x 1 root admin 645256 Jan 30 01:21 libboost_math_tr1l-mt.dylib
-rwxr-xr-x 1 root admin 71040 Jan 30 01:21 libboost_prg_exec_monitor-mt.dylib
-rwxr-xr-x 1 root admin 630380 Jan 30 01:21 libboost_program_options-mt.dylib
-rwxr-xr-x 1 root admin 441572 Jan 30 01:21 libboost_python-mt.dylib
-rwxr-xr-x 1 root admin 38224 Jan 30 01:21 libboost_random-mt.dylib
-rwxr-xr-x 1 root admin 1355040 Jan 30 01:21 libboost_regex-mt.dylib
-rwxr-xr-x 1 root admin 572924 Jan 30 01:21 libboost_serialization-mt.dylib
-rwxr-xr-x 1 root admin 123452 Jan 30 01:21 libboost_signals-mt.dylib
-rw-r--r-- 1 root admin 82200 Jan 30 01:21 libboost_system-mt.a
-rwxr-xr-x 1 root admin 25148 Jan 30 01:20 libboost_system-mt.dylib
-rw-r--r-- 1 root admin 11787512 Jan 30 01:21 libboost_test_exec_monitor-mt.a
-rwxr-xr-x 1 root admin 152956 Jan 30 01:20 libboost_thread-mt.dylib
-rw-r--r-- 1 root admin 256272 Jan 30 01:21 libboost_timer-mt.a
-rwxr-xr-x 1 root admin 48504 Jan 30 01:21 libboost_timer-mt.dylib
-rwxr-xr-x 1 root admin 1014044 Jan 30 01:21 libboost_unit_test_framework-mt.dylib
-rwxr-xr-x 1 root admin 2336956 Jan 30 01:21 libboost_wave-mt.dylib
-rwxr-xr-x 1 root admin 423044 Jan 30 01:21 libboost_wserialization-mt.dylib
-rwxr-xr-x 1 root admin 77960 Jan 29 16:21 libbz2.1.0.6.dylib
lrwxr-xr-x 1 root admin 18 Jan 29 16:21 libbz2.1.0.dylib -> libbz2.1.0.6.dylib
lrwxr-xr-x 1 root admin 18 Jan 29 16:21 libbz2.1.dylib -> libbz2.1.0.6.dylib
-rw-r--r-- 1 root admin 184472 Jan 29 16:21 libbz2.a
lrwxr-xr-x 1 root admin 18 Jan 29 16:21 libbz2.dylib -> libbz2.1.0.6.dylib
-rw-r--r-- 1 root admin 9088 Jan 29 16:15 libcharset.1.dylib
-rw-r--r-- 1 root admin 3720 Jan 29 16:15 libcharset.a
lrwxr-xr-x 1 root admin 18 Jan 29 16:15 libcharset.dylib -> libcharset.1.dylib
-r-xr-xr-x 1 root admin 2048916 May 3 13:08 libcrypto.1.0.0.dylib
-rw-r--r-- 1 root admin 3372840 May 3 13:08 libcrypto.a
lrwxr-xr-x 1 root admin 21 May 3 13:08 libcrypto.dylib -> libcrypto.1.0.0.dylib
lrwxr-xr-x 1 root admin 12 Jan 29 16:15 libcurses.a -> libncurses.a
lrwxr-xr-x 1 root admin 18 Jan 29 16:15 libcurses.dylib -> libncurses.6.dylib
-rwxr-xr-x 1 root admin 171984 Jan 29 20:46 libedit.0.dylib
-rw-r--r-- 1 root admin 260032 Jan 29 20:46 libedit.a
lrwxr-xr-x 1 root admin 15 Jan 29 20:46 libedit.dylib -> libedit.0.dylib
-rwxr-xr-x 1 root admin 129924 May 17 17:25 libexpat.1.dylib
-rw-r--r-- 1 root admin 158128 May 17 17:25 libexpat.a
lrwxr-xr-x 1 root admin 16 May 17 17:25 libexpat.dylib -> libexpat.1.dylib
-rwxr-xr-x 1 root admin 58792 Jan 29 16:15 libform.6.dylib
-rw-r--r-- 1 root admin 100680 Jan 29 16:15 libform.a
lrwxr-xr-x 1 root admin 15 Jan 29 16:15 libform.dylib -> libform.6.dylib
lrwxr-xr-x 1 root admin 15 Jan 29 16:15 libformw.6.dylib -> libform.6.dylib
lrwxr-xr-x 1 root admin 9 Jan 29 16:15 libformw.a -> libform.a
lrwxr-xr-x 1 root admin 15 Jan 29 16:15 libformw.dylib -> libform.6.dylib
-rwxr-xr-x 1 root admin 1477476 Jun 16 06:43 libgettextlib-0.19.8.1.dylib
lrwxr-xr-x 1 root admin 28 Jun 16 06:43 libgettextlib.dylib -> libgettextlib-0.19.8.1.dylib
-rwxr-xr-x 1 root admin 325504 Jun 16 06:43 libgettextpo.0.dylib
-rw-r--r-- 1 root admin 515768 Jun 16 06:43 libgettextpo.a
lrwxr-xr-x 1 root admin 20 Jun 16 06:43 libgettextpo.dylib -> libgettextpo.0.dylib
-rwxr-xr-x 1 root admin 276312 Jun 16 06:43 libgettextsrc-0.19.8.1.dylib
lrwxr-xr-x 1 root admin 28 Jun 16 06:43 libgettextsrc.dylib -> libgettextsrc-0.19.8.1.dylib
lrwxr-xr-x 1 root admin 20 Jan 30 01:35 libhistory.6.2.dylib -> libhistory.6.3.dylib
-r-xr-xr-x 1 root admin 35264 Jan 30 01:35 libhistory.6.3.dylib
lrwxr-xr-x 1 root admin 20 Jan 30 01:35 libhistory.6.dylib -> libhistory.6.3.dylib
-rw-r--r-- 1 root admin 41336 Jan 30 01:35 libhistory.a
lrwxr-xr-x 1 root admin 20 Jan 30 01:35 libhistory.dylib -> libhistory.6.3.dylib
-rw-r--r-- 1 root admin 1052104 Jan 29 16:15 libiconv.2.dylib
-rw-r--r-- 1 root admin 1088128 Jan 29 16:15 libiconv.a
lrwxr-xr-x 1 root admin 16 Jan 29 16:15 libiconv.dylib -> libiconv.2.dylib
-rwxr-xr-x 1 root admin 25911392 Jan 29 23:00 libicudata.55.1.dylib
lrwxr-xr-x 1 root admin 21 Jan 29 23:00 libicudata.55.dylib -> libicudata.55.1.dylib
-rwxr-xr-x 1 root admin 25909112 Jan 29 22:59 libicudata.a
lrwxr-xr-x 1 root admin 21 Jan 29 23:00 libicudata.dylib -> libicudata.55.1.dylib
-rwxr-xr-x 1 root admin 2228116 Jan 29 22:59 libicui18n.55.1.dylib
lrwxr-xr-x 1 root admin 21 Jan 29 22:59 libicui18n.55.dylib -> libicui18n.55.1.dylib
-rwxr-xr-x 1 root admin 3840808 Jan 29 22:59 libicui18n.a
lrwxr-xr-x 1 root admin 21 Jan 29 22:59 libicui18n.dylib -> libicui18n.55.1.dylib
-rwxr-xr-x 1 root admin 54240 Jan 29 22:59 libicuio.55.1.dylib
lrwxr-xr-x 1 root admin 19 Jan 29 22:59 libicuio.55.dylib -> libicuio.55.1.dylib
-rwxr-xr-x 1 root admin 65984 Jan 29 22:59 libicuio.a
lrwxr-xr-x 1 root admin 19 Jan 29 22:59 libicuio.dylib -> libicuio.55.1.dylib
-rwxr-xr-x 1 root admin 302436 Jan 29 22:59 libicule.55.1.dylib
lrwxr-xr-x 1 root admin 19 Jan 29 22:59 libicule.55.dylib -> libicule.55.1.dylib
-rwxr-xr-x 1 root admin 581304 Jan 29 22:59 libicule.a
lrwxr-xr-x 1 root admin 19 Jan 29 22:59 libicule.dylib -> libicule.55.1.dylib
-rwxr-xr-x 1 root admin 42200 Jan 29 22:59 libiculx.55.1.dylib
lrwxr-xr-x 1 root admin 19 Jan 29 22:59 libiculx.55.dylib -> libiculx.55.1.dylib
-rwxr-xr-x 1 root admin 59832 Jan 29 22:59 libiculx.a
lrwxr-xr-x 1 root admin 19 Jan 29 22:59 libiculx.dylib -> libiculx.55.1.dylib
-rwxr-xr-x 1 root admin 57668 Jan 29 22:59 libicutest.55.1.dylib
lrwxr-xr-x 1 root admin 21 Jan 29 22:59 libicutest.55.dylib -> libicutest.55.1.dylib
-rwxr-xr-x 1 root admin 76696 Jan 29 22:59 libicutest.a
lrwxr-xr-x 1 root admin 21 Jan 29 22:59 libicutest.dylib -> libicutest.55.1.dylib
-rwxr-xr-x 1 root admin 170744 Jan 29 22:59 libicutu.55.1.dylib
lrwxr-xr-x 1 root admin 19 Jan 29 22:59 libicutu.55.dylib -> libicutu.55.1.dylib
-rwxr-xr-x 1 root admin 237424 Jan 29 22:59 libicutu.a
lrwxr-xr-x 1 root admin 19 Jan 29 22:59 libicutu.dylib -> libicutu.55.1.dylib
-rwxr-xr-x 1 root admin 1396828 Jan 29 22:59 libicuuc.55.1.dylib
lrwxr-xr-x 1 root admin 19 Jan 29 22:59 libicuuc.55.dylib -> libicuuc.55.1.dylib
-rwxr-xr-x 1 root admin 2162520 Jan 29 22:59 libicuuc.a
lrwxr-xr-x 1 root admin 19 Jan 29 22:59 libicuuc.dylib -> libicuuc.55.1.dylib
-rw-r--r-- 1 root admin 54252 Jun 16 06:43 libintl.8.dylib
-rw-r--r-- 1 root admin 72392 Jun 16 06:43 libintl.a
lrwxr-xr-x 1 root admin 15 Jun 16 06:43 libintl.dylib -> libintl.8.dylib
-rwxr-xr-x 1 root admin 26556 Jan 29 16:15 libmenu.6.dylib
-rw-r--r-- 1 root admin 45392 Jan 29 16:15 libmenu.a
lrwxr-xr-x 1 root admin 15 Jan 29 16:15 libmenu.dylib -> libmenu.6.dylib
lrwxr-xr-x 1 root admin 15 Jan 29 16:15 libmenuw.6.dylib -> libmenu.6.dylib
lrwxr-xr-x 1 root admin 9 Jan 29 16:15 libmenuw.a -> libmenu.a
lrwxr-xr-x 1 root admin 15 Jan 29 16:15 libmenuw.dylib -> libmenu.6.dylib
-rwxr-xr-x 1 root admin 66060 Jan 29 16:15 libncurses++.6.dylib
-rw-r--r-- 1 root admin 104160 Jan 29 16:15 libncurses++.a
lrwxr-xr-x 1 root admin 20 Jan 29 16:15 libncurses++.dylib -> libncurses++.6.dylib
lrwxr-xr-x 1 root admin 20 Jan 29 16:15 libncurses++w.6.dylib -> libncurses++.6.dylib
lrwxr-xr-x 1 root admin 14 Jan 29 16:15 libncurses++w.a -> libncurses++.a
lrwxr-xr-x 1 root admin 20 Jan 29 16:15 libncurses++w.dylib -> libncurses++.6.dylib
-rwxr-xr-x 1 root admin 309972 Jan 29 16:15 libncurses.6.dylib
-rw-r--r-- 1 root admin 542104 Jan 29 16:15 libncurses.a
lrwxr-xr-x 1 root admin 18 Jan 29 16:15 libncurses.dylib -> libncurses.6.dylib
lrwxr-xr-x 1 root admin 18 Jan 29 16:15 libncursesw.6.dylib -> libncurses.6.dylib
lrwxr-xr-x 1 root admin 12 Jan 29 16:15 libncursesw.a -> libncurses.a
lrwxr-xr-x 1 root admin 18 Jan 29 16:15 libncursesw.dylib -> libncurses.6.dylib
-rwxr-xr-x 1 root admin 13756 Jan 29 16:15 libpanel.6.dylib
-rw-r--r-- 1 root admin 17200 Jan 29 16:15 libpanel.a
lrwxr-xr-x 1 root admin 16 Jan 29 16:15 libpanel.dylib -> libpanel.6.dylib
lrwxr-xr-x 1 root admin 16 Jan 29 16:15 libpanelw.6.dylib -> libpanel.6.dylib
lrwxr-xr-x 1 root admin 10 Jan 29 16:15 libpanelw.a -> libpanel.a
lrwxr-xr-x 1 root admin 16 Jan 29 16:15 libpanelw.dylib -> libpanel.6.dylib
lrwxr-xr-x 1 root admin 66 Mar 1 21:42 libpython2.7.dylib -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python
lrwxr-xr-x 1 root admin 21 Jan 30 01:35 libreadline.6.2.dylib -> libreadline.6.3.dylib
-r-xr-xr-x 1 root admin 223256 Jan 30 01:35 libreadline.6.3.dylib
lrwxr-xr-x 1 root admin 21 Jan 30 01:35 libreadline.6.dylib -> libreadline.6.3.dylib
-rw-r--r-- 1 root admin 377744 Jan 30 01:35 libreadline.a
lrwxr-xr-x 1 root admin 21 Jan 30 01:35 libreadline.dylib -> libreadline.6.3.dylib
-rwxr-xr-x 1 root admin 871688 May 19 07:05 libsqlite3.0.dylib
-rw-r--r-- 1 root admin 1129904 May 19 07:05 libsqlite3.a
lrwxr-xr-x 1 root admin 18 May 19 07:05 libsqlite3.dylib -> libsqlite3.0.dylib
-r-xr-xr-x 1 root admin 388176 May 3 13:08 libssl.1.0.0.dylib
-rw-r--r-- 1 root admin 550880 May 3 13:08 libssl.a
lrwxr-xr-x 1 root admin 18 May 3 13:08 libssl.dylib -> libssl.1.0.0.dylib
lrwxr-xr-x 1 root admin 18 Jan 29 16:15 libtermcap.dylib -> libncurses.6.dylib
-rwxr-xr-x 1 root admin 80356 Jan 29 16:21 libz.1.2.8.dylib
lrwxr-xr-x 1 root admin 16 Jan 29 16:21 libz.1.dylib -> libz.1.2.8.dylib
-rw-r--r-- 1 root admin 93744 Jan 29 16:21 libz.a
lrwxr-xr-x 1 root admin 16 Jan 29 16:21 libz.dylib -> libz.1.2.8.dylib
drwxr-xr-x 25 root admin 850 Jun 17 00:03 pkgconfig
lrwxr-xr-x 1 root admin 17 Jan 29 16:15 terminfo -> ../share/terminfo
是否有缺少的库?
最佳答案
终于解决了问题:
这是由于在OSX中实现了2种不同的C ++库。添加-stdlib = libc ++可以解决此问题。
关于c++ - 无法在Mac上使用Quantlib运行示例代码,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/37873071/