Hi ,
I modified the test-suite and compile it under QuantLib-0.9.7/test-suite , but got following errors 'undefined reference to ... ProjectedCostFunction' which is defined in /ql/math/optimization/projectedcostfunction.cpp. I suppose the libMath should have that function included so in the g++ cmd, the libMath is also added but still failed, please tell what is the problem.
thanks.
/bin/sh ../libtool --tag=CXX --mode=link g++ -g -O0 -Wall -L/usr/lib -o test-suite_sun.exe -lboost_unit_test_framework-gcc-mt testsuite_sun.o marketmodel_sun.o ../ql/termstructure.lo ../ql/errors.lo ../ql/timegrid.lo ../ql/settings.lo ../ql/interestrate.lo ../ql/discretizedasset.lo libUnitMain.la ../ql/models/marketmodels/libMarketModels.la ../ql/time/libTime.la ../ql/legacy/libLegacy.la ../ql/pricingengines/libPricingengines.la ../ql/math/libMath.la ../ql/termstructures/libTermStructures.la ../ql/methods/libMethods.la ../ql/utilities/libUtilities.la ../ql/processes/libProcesses.la ../ql/instruments/libInstruments.la
libtool: link: g++ -g -O0 -Wall -o .libs/test-suite_sun.exe testsuite_sun.o marketmodel_sun.o ../ql/.libs/termstructure.o ../ql/.libs/errors.o ../ql/.libs/timegrid.o ../ql/.libs/settings.o ../ql/.libs/interestrate.o ../ql/.libs/discretizedasset.o -L/usr/lib -lboost_unit_test_framework-gcc-mt ./.libs/libUnitMain.a ../ql/models/marketmodels/.libs/libMarketModels.a ../ql/time/.libs/libTime.a ../ql/legacy/.libs/libLegacy.a ../ql/pricingengines/.libs/libPricingEngines.a ../ql/math/.libs/libMath.a ../ql/termstructures/.libs/libTermStructures.a ../ql/methods/.libs/libMethods.a ../ql/utilities/.libs/libUtilities.a ../ql/processes/.libs/libProcesses.a ../ql/instruments/.libs/libInstruments.a
../ql/termstructures/.libs/libTermStructures.a(abcdcalibration.o): In function `_ZN8QuantLib15AbcdCalibration7computeEv':
/home/sun/QuantLib-0.9.7/ql/termstructures/volatility/abcdcalibration.cpp:109: undefined reference to `QuantLib::ProjectedCostFunction::ProjectedCostFunction(QuantLib::CostFunction const&, QuantLib::Array const&, std::vector<bool, std::allocator<bool> > const&)'
../ql/termstructures/.libs/libTermStructures.a(abcdcalibration.o): In function `_ZN8QuantLib15AbcdCalibration7computeEv':
/home/sun/QuantLib-0.9.7/ql/termstructures/volatility/../../../ql/math/array.hpp:214: undefined reference to `QuantLib::ProjectedCostFunction::project(QuantLib::Array const&) const'
/home/sun/QuantLib-0.9.7/ql/termstructures/volatility/../../../ql/math/array.hpp:214: undefined reference to `QuantLib::ProjectedCostFunction::include(QuantLib::Array const&) const'
------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
On Sat, 2009-03-28 at 11:03 +0800, sun wrote:
> I modified the test-suite and compile it under > QuantLib-0.9.7/test-suite , but got following errors 'undefined > reference to ... ProjectedCostFunction' > > /bin/sh ../libtool --tag=CXX --mode=link g++ -g -O0 -Wall -L/usr/lib > -o test-suite_sun.exe -lboost_unit_test_framework-gcc-mt You're missing the -lQuantLib to link the library to your program. Luigi -- Weiler's Law: Nothing is impossible for the man who doesn't have to do it himself. ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Is it possible to compile with the libs from QuantLib's subfolder
those only needed by testing codes so that I only need to update the modified libs instead of recompiling the Quantlib everytime after small changes ? The function in the error is defined in MathLib and I already include it in build cmd, please help to advise. thanks, sun On Mon, Mar 30, 2009 at 5:19 PM, Luigi Ballabio <[hidden email]> wrote: > On Sat, 2009-03-28 at 11:03 +0800, sun wrote: >> I modified the test-suite and compile it under >> QuantLib-0.9.7/test-suite , but got following errors 'undefined >> reference to ... ProjectedCostFunction' >> >> /bin/sh ../libtool --tag=CXX --mode=link g++ -g -O0 -Wall -L/usr/lib >> -o test-suite_sun.exe -lboost_unit_test_framework-gcc-mt > > You're missing the -lQuantLib to link the library to your program. > > Luigi > > ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Seems you are using Unix alike system, doesn't `make` handle your case automatically?
Is it possible to compile with the libs from QuantLib's subfolder those only needed by testing codes so that I only need to update the modified libs instead of recompiling the Quantlib everytime after small changes ? The function in the error is defined in MathLib and I already include it in build cmd, please help to advise. thanks, sun On Mon, Mar 30, 2009 at 5:19 PM, Luigi Ballabio <[hidden email]> wrote: > On Sat, 2009-03-28 at 11:03 +0800, sun wrote: >> I modified the test-suite and compile it under >> QuantLib-0.9.7/test-suite , but got following errors 'undefined >> reference to ... ProjectedCostFunction' >> >> /bin/sh ../libtool --tag=CXX --mode=link g++ -g -O0 -Wall -L/usr/lib >> -o test-suite_sun.exe -lboost_unit_test_framework-gcc-mt > > You're missing the -lQuantLib to link the library to your program. > > Luigi > > ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users ________________________________________________________ DTCC DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify us immediately and delete the email and any attachments from your system. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |