|
From: Bojan N. <bo...@bn...> - 2012-09-02 09:53:17
|
Hi Luigi et al,
Here are some very small cleanup patches I had to apply to get the build
work satisfactorily with mingw32 4.2.1 and boost 1.50:
- Boost v1.50 seems to need an assertion_failed function version which
also takes a message:
--- a/QuantLib/ql/errors.cpp
+++ b/QuantLib/ql/errors.cpp
@@ -81,6 +81,16 @@
namespace boost {
// must be defined by the user
+ void assertion_failed_msg(char const * expr, char const * function,
+ char const * file, char const *mm, long line) {
+ throw std::runtime_error(format(file, line, function,
+ "Boost assertion failed: " +
+ std::string(expr)+
+ " with message: "+
+ std::string(mm)));
+ }
+
+ // must be defined by the user
void assertion_failed(char const * expr, char const * function,
char const * file, long line) {
throw std::runtime_error(format(file, line, function,
- GammaFunction class does not have a user-specified default
constructor, so const instances needs to be explicitly
default-constructed
--- a/QuantLib/ql/pricingengines/vanilla/analytich1hwengine.cpp
+++ b/QuantLib/ql/pricingengines/vanilla/analytich1hwengine.cpp
@@ -81,7 +81,7 @@
}
Real AnalyticH1HWEngine::Fj_Helper::Lambda(Time t) const {
- const GammaFunction g;
+ const GammaFunction g=GammaFunction();
const Size maxIter = 1000;
const Real lambdaT = lambda(t);
- Libraries to link against should ideally go in LDADD postfix variables
--- a/QuantLib/test-suite/Makefile.am
+++ b/QuantLib/test-suite/Makefile.am
@@ -179,12 +179,12 @@
endif
quantlib_test_suite_SOURCES = ${QL_TESTS}
-quantlib_test_suite_LDADD = libUnitMain.la ${top_builddir}/ql/libQuantLib.la
-quantlib_test_suite_LDFLAGS = -l${BOOST_UNIT_TEST_LIB}
+quantlib_test_suite_LDADD = libUnitMain.la ${top_builddir}/ql/libQuantLib.la -\
l${BOOST_UNIT_TEST_LIB}
+quantlib_test_suite_LDFLAGS =
quantlib_benchmark_SOURCES = ${QL_BENCHMARKS}
-quantlib_benchmark_LDADD = libUnitMain.la ${top_builddir}/ql/libQuantLib.la
-quantlib_benchmark_LDFLAGS = -l${BOOST_UNIT_TEST_LIB}
+quantlib_benchmark_LDADD = libUnitMain.la ${top_builddir}/ql/libQuantLib.la -l\
${BOOST_UNIT_TEST_LIB}
+quantlib_benchmark_LDFLAGS =
TESTS = quantlib-test-suite$(EXEEXT)
TESTS_ENVIRONMENT = BOOST_TEST_LOG_LEVEL=message
--
Bojan Nikolic || http://www.bnikolic.co.uk
|