I have uncommented # define QL_ENABLE_SESSIONS in userconfig.hpp file and successfully rebuilt QuantLib library. Then I modified swap.i file to add a fixedLeg method that returns a Leg. Then I successfully executed “python setup.py wrap” call. I got below errors when I tried “python setup.py build” call. Did I miss anything? Do I need to insert sessionId() method in any of the QuantLib classes ? Thank you. Creating library build\temp.win-amd64-2.7\Release\QuantLib\_QuantLib.lib and object build\temp.win-amd64-2.7\Release\ uantLib\_QuantLib.exp uantLib-vc110-x64-mt.lib(cpicouponpricer.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessio Id(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(overnightindexedcoupon.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib: sessionId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(swaptionvolcube.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessio Id(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(smilesection.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(inflationcoupon.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessio Id(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(inflationcouponpricer.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib:: essionId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(makevanillaswap.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessio Id(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(makeois.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId(void " (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(forward.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId(void " (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(swaptionvoldiscrete.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::se sionId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(analyticcapfloorengine.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib: sessionId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(midpointcdsengine.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sess onId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(capfloortermvolcurve.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::s ssionId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(imm.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId(void)" ( sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(lecuyeruniformrng.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sess onId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(discountingswapengine.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib:: essionId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(ratehelpers.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId( oid)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(discountingbondengine.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib:: essionId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(inflationhelpers.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessi nId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(capfloor.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId(voi )" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(forwardrateagreement.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::s ssionId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(knuthuniformrng.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessio Id(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(bond.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId(void)" ?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(mt19937uniformrng.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sess onId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(defaultprobabilityhelpers.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantL b::sessionId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(inflationcapfloor.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sess onId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(cashflows.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId(vo d)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(couponpricer.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(conundrumpricer.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessio Id(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(exchangeratemanager.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::se sionId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(interestrateindex.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sess onId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(schedule.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId(voi )" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(iborcoupon.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId(v id)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(inflationindex.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::session d(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(index.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(settings.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId(voi )" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(termstructure.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionI (void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(floatingratecoupon.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::ses ionId(void)" (?sessionId@QuantLib@@YAHXZ) uantlib_wrap.obj : error LNK2019: unresolved external symbol "int __cdecl QuantLib::sessionId(void)" (?sessionId@QuantL b@@YAHXZ) referenced in function "public: static class QuantLib::ExchangeRateManager & __cdecl QuantLib::Singleton<clas QuantLib::ExchangeRateManager>::instance(void)" (?instance@?$Singleton@VExchangeRateManager@QuantLib@@@QuantLib@@SAAEA ExchangeRateManager@2@XZ) uantLib-vc110-x64-mt.lib(event.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId(void)" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(cashflow.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId(voi )" (?sessionId@QuantLib@@YAHXZ) uantLib-vc110-x64-mt.lib(money.obj) : error LNK2001: unresolved external symbol "int __cdecl QuantLib::sessionId(void)" (?sessionId@QuantLib@@YAHXZ) uild\lib.win-amd64-2.7\QuantLib\_QuantLib.pyd : fatal error LNK1120: 1 unresolved externals rror: command '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\link.exe"' failed with exit status 112 ............................................................................ For further important information about AllianceBernstein please click here ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi,
apologies for the delay, I was on vacation. Yes, you have to define a sessionId() function (not a method) and link it in the Python module together with the library. (If you define QL_ENABLE_SESSIONS, this is required whether or not you modify the wrapper). Luigi On Tue, Aug 12, 2014 at 6:59 PM, Ghorpadkar, Suhas <[hidden email]> wrote: > I have uncommented # define QL_ENABLE_SESSIONS in userconfig.hpp file and > successfully rebuilt QuantLib library. > > Then I modified swap.i file to add a fixedLeg method that returns a Leg. > > Then I successfully executed “python setup.py wrap” call. > > I got below errors when I tried “python setup.py build” call. > > Did I miss anything? Do I need to insert sessionId() method in any of the > QuantLib classes ? > > > > Thank you. > > > > Creating library build\temp.win-amd64-2.7\Release\QuantLib\_QuantLib.lib and > object build\temp.win-amd64-2.7\Release\ > > uantLib\_QuantLib.exp > > uantLib-vc110-x64-mt.lib(cpicouponpricer.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sessio > > Id(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(overnightindexedcoupon.obj) : error LNK2001: > unresolved external symbol "int __cdecl QuantLib: > > sessionId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(swaptionvolcube.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sessio > > Id(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(smilesection.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sessionId > > void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(inflationcoupon.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sessio > > Id(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(inflationcouponpricer.obj) : error LNK2001: > unresolved external symbol "int __cdecl QuantLib:: > > essionId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(makevanillaswap.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sessio > > Id(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(makeois.obj) : error LNK2001: unresolved external > symbol "int __cdecl QuantLib::sessionId(void > > " (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(forward.obj) : error LNK2001: unresolved external > symbol "int __cdecl QuantLib::sessionId(void > > " (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(swaptionvoldiscrete.obj) : error LNK2001: > unresolved external symbol "int __cdecl QuantLib::se > > sionId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(analyticcapfloorengine.obj) : error LNK2001: > unresolved external symbol "int __cdecl QuantLib: > > sessionId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(midpointcdsengine.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sess > > onId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(capfloortermvolcurve.obj) : error LNK2001: > unresolved external symbol "int __cdecl QuantLib::s > > ssionId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(imm.obj) : error LNK2001: unresolved external > symbol "int __cdecl QuantLib::sessionId(void)" ( > > sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(lecuyeruniformrng.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sess > > onId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(discountingswapengine.obj) : error LNK2001: > unresolved external symbol "int __cdecl QuantLib:: > > essionId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(ratehelpers.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sessionId( > > oid)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(discountingbondengine.obj) : error LNK2001: > unresolved external symbol "int __cdecl QuantLib:: > > essionId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(inflationhelpers.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sessi > > nId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(capfloor.obj) : error LNK2001: unresolved external > symbol "int __cdecl QuantLib::sessionId(voi > > )" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(forwardrateagreement.obj) : error LNK2001: > unresolved external symbol "int __cdecl QuantLib::s > > ssionId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(knuthuniformrng.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sessio > > Id(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(bond.obj) : error LNK2001: unresolved external > symbol "int __cdecl QuantLib::sessionId(void)" > > ?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(mt19937uniformrng.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sess > > onId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(defaultprobabilityhelpers.obj) : error LNK2001: > unresolved external symbol "int __cdecl QuantL > > b::sessionId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(inflationcapfloor.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sess > > onId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(cashflows.obj) : error LNK2001: unresolved external > symbol "int __cdecl QuantLib::sessionId(vo > > d)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(couponpricer.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sessionId > > void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(conundrumpricer.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sessio > > Id(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(exchangeratemanager.obj) : error LNK2001: > unresolved external symbol "int __cdecl QuantLib::se > > sionId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(interestrateindex.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sess > > onId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(schedule.obj) : error LNK2001: unresolved external > symbol "int __cdecl QuantLib::sessionId(voi > > )" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(iborcoupon.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sessionId(v > > id)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(inflationindex.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::session > > d(void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(index.obj) : error LNK2001: unresolved external > symbol "int __cdecl QuantLib::sessionId(void)" > > (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(settings.obj) : error LNK2001: unresolved external > symbol "int __cdecl QuantLib::sessionId(voi > > )" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(termstructure.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::sessionI > > (void)" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(floatingratecoupon.obj) : error LNK2001: unresolved > external symbol "int __cdecl QuantLib::ses > > ionId(void)" (?sessionId@QuantLib@@YAHXZ) > > uantlib_wrap.obj : error LNK2019: unresolved external symbol "int __cdecl > QuantLib::sessionId(void)" (?sessionId@QuantL > > b@@YAHXZ) referenced in function "public: static class > QuantLib::ExchangeRateManager & __cdecl QuantLib::Singleton<clas > > QuantLib::ExchangeRateManager>::instance(void)" > (?instance@?$Singleton@VExchangeRateManager@QuantLib@@@QuantLib@@SAAEA > > ExchangeRateManager@2@XZ) > > uantLib-vc110-x64-mt.lib(event.obj) : error LNK2001: unresolved external > symbol "int __cdecl QuantLib::sessionId(void)" > > (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(cashflow.obj) : error LNK2001: unresolved external > symbol "int __cdecl QuantLib::sessionId(voi > > )" (?sessionId@QuantLib@@YAHXZ) > > uantLib-vc110-x64-mt.lib(money.obj) : error LNK2001: unresolved external > symbol "int __cdecl QuantLib::sessionId(void)" > > (?sessionId@QuantLib@@YAHXZ) > > uild\lib.win-amd64-2.7\QuantLib\_QuantLib.pyd : fatal error LNK1120: 1 > unresolved externals > > rror: command '"C:\Program Files (x86)\Microsoft Visual Studio > 12.0\VC\BIN\amd64\link.exe"' failed with exit status 112 > > ............................................................................ > > For further important information about AllianceBernstein please click here > http://www.alliancebernstein.com/disclaimer/email/disclaimer.html > > > ------------------------------------------------------------------------------ > > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users > -- <https://implementingquantlib.blogspot.com> <https://twitter.com/lballabio> ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |