I've just compiled (sucessfully) the latest SVN Quantlib. Now I'm
building the Quantlib-SWIG interface for Perl. I've run into an error w.r.t the recently contributed 'ql/math/randomnumbers/ranluxuniformrng.hpp'. Commenting its #include out of 'ql/math/randomnumbers/all.hpp' lets this compile cleanly. For my purposes (at the moment, pretty simple calculations) this is an acceptable work-around, but something can't be right... Here's the start of the error report: [andrewsm@square Perl]$ make make all-am make[1]: Entering directory `/home/andrewsm/linux/programming/oss/quantlib/trunk/QuantLib-SWIG/Perl' make -f Makefile.quantlib make[2]: Entering directory `/home/andrewsm/linux/programming/oss/quantlib/trunk/QuantLib-SWIG/Perl' gcc -std=gnu99 -c -I/home/andrewsm/.quantlib-local/include -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -g -O2 -fno-strict-aliasing -Wno-unused -Wno-uninitialized -Wno-sign-compare -Wno-write-strings -DVERSION=\"0.9.8\" -DXS_VERSION=\"0.9.8\" -fPIC "-I/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/CORE" quantlib_wrap.cpp cc1plus: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++ In file included from /usr/include/boost/random/subtract_with_carry.hpp:29, from /usr/include/boost/random/ranlux.hpp:20, from /home/andrewsm/.quantlib-local/include/ql/math/randomnumbers/ranluxuniformrng.hpp:28, from /home/andrewsm/.quantlib-local/include/ql/math/randomnumbers/all.hpp:18, from /home/andrewsm/.quantlib-local/include/ql/math/all.hpp:33, from /home/andrewsm/.quantlib-local/include/ql/quantlib.hpp:46, from quantlib_wrap.cpp:2051: /usr/include/boost/random/linear_congruential.hpp:68:61: error: macro "seed" passed 2 arguments, but takes just 0 /usr/include/boost/random/linear_congruential.hpp:71:27: error: macro "seed" passed 1 arguments, but takes just 0 /usr/include/boost/random/linear_congruential.hpp:78:31: error: macro "seed" passed 2 arguments, but takes just 0 /usr/include/boost/random/linear_congruential.hpp:214:27: error: macro "seed" passed 1 arguments, but takes just 0 /usr/include/boost/random/linear_congruential.hpp:214:47: error: macro "seed" passed 1 arguments, but takes just 0 /usr/include/boost/random/linear_congruential.hpp:215:24: error: macro "seed" passed 1 arguments, but takes just 0 /usr/include/boost/random/linear_congruential.hpp:215:39: error: macro "seed" passed 1 arguments, but takes just 0 /usr/include/boost/random/linear_congruential.hpp:216:50: error: macro "seed" passed 2 arguments, but takes just 0 /usr/include/boost/random/linear_congruential.hpp:216:73: error: macro "seed" passed 2 arguments, but takes just 0 In file included from /usr/include/boost/random/ranlux.hpp:20, from /home/andrewsm/.quantlib-local/include/ql/math/randomnumbers/ranluxuniformrng.hpp:28, from /home/andrewsm/.quantlib-local/include/ql/math/randomnumbers/all.hpp:18, from /home/andrewsm/.quantlib-local/include/ql/math/all.hpp:33, from /home/andrewsm/.quantlib-local/include/ql/quantlib.hpp:46, from quantlib_wrap.cpp:2051: /usr/include/boost/random/subtract_with_carry.hpp:88:60: error: macro "seed" passed 1 arguments, but takes just 0 /usr/include/boost/random/subtract_with_carry.hpp:90:59: error: macro "seed" passed 1 arguments, but takes just 0 /usr/include/boost/random/subtract_with_carry.hpp:91:79: error: macro "seed" passed 2 arguments, but takes just 0 /usr/include/boost/random/subtract_with_carry.hpp:95:39: error: macro "seed" passed 1 arguments, but takes just 0 /usr/include/boost/random/subtract_with_carry.hpp:98:16: error: macro "seed" passed 1 arguments, but takes just 0 /usr/include/boost/random/subtract_with_carry.hpp:105:28: error: macro "seed" passed 1 arguments, but takes just 0 Hope this helps someone Martin :-) PS: I've got a penny-perfect Perl version of the example 'swapvaluation.cpp' ready for submission, if anyone's interested. ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
On Sun, 2009-01-11 at 01:47 -0500, Martin Andrews wrote:
> I've just compiled (sucessfully) the latest SVN Quantlib. Now I'm > building the Quantlib-SWIG interface for Perl. I've run into an error > w.r.t the recently contributed > 'ql/math/randomnumbers/ranluxuniformrng.hpp'. > > Here's the start of the error report: > > [...] /usr/include/boost/random/linear_congruential.hpp:68:61: error: macro > "seed" passed 2 arguments, but takes just 0 Hmm. Do the Perl headers, by any chance, define a macro called "seed"? What happens if you edit ql.i and add "undef seed" inside the "#ifdef SWIGPERL" section at the beginning? > PS: I've got a penny-perfect Perl version of the example > 'swapvaluation.cpp' ready for submission, if anyone's interested. I am--send it to me and I'll include it in next release. (I'm also happy to see that the Perl module works for someone; it segfaults on my machine. I might come back to you and ask for details...) Luigi -- If you can't convince them, confuse them. -- Harry S. Truman ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Free forum by Nabble | Edit this page |