|
From: Mike S. <ma...@gm...> - 2013-06-04 06:04:44
|
Hi all, The PrimitivePolynomial array is declared as "extern" only when the code is compiled as C++, which seems like it would cause problems in files compiled as straight C. I think this was fixed a couple months ago making sure that Visual Studio 2012 compiles better with level 4 warnings enabled so it should be part of the next release. The change I made was to move the extern keyword out of the #ifdef __cplusplus block before the variable declaration to the line directly above the #ifdef. Unfortunately, I don't have access to the problem configuration so I can't be sure, but it should be simple to check to see if that solves the problem. Mike On Mon, Jun 3, 2013 at 7:50 AM, Luigi Ballabio <lui...@gm...>wrote: > Hello Paul, > thanks for the report. As for (a), would <cmath> and <cstdlib> > work as well instead of math.h and stdlib.h? May you try it if you > didn't already? > > (b) is strange. It looks like your compiler requires > primitivepolynomials.c to be compiled as C++ instead of plain C, but I > have no idea why... > > Luigi > > > On Fri, May 24, 2013 at 3:18 PM, <Pau...@de...> wrote: > > > > Hello! > > > > We compiled quantlib on a SunOS 5.10, using Sun Workshop 12.2 (cc: Sun C > > 5.11 SunOS_i386 2010/08/13) for 64bit. > > We used the latest boost (1.53.0). > > Our configure was not special: > > ./configure --with-boost-include=../boost_1_53_0 > > --with-boost-lib=../boost_1_53_0/libs > > > > However we used: > > CXXFLAGS=-library=stlport4 -m64 > > > > We managed to compile the lib, but had to do some changes: > > a) includes > > We had to include "math.h and stdlib.h" to cpicoupon.cpp > > > > We had to include math.h to: > > riskyassetswapoption.cpp > > blackdeltacalculator.cpp > > cpicapfloorengines.cpp > > zigguratrng.cpp > > analyticvariancegammaengine.cpp > > fftvanillaengine.cpp > > fftvariancegammaengine.cpp > > cpiswap.cpp > > cpibond.cpp > > analyticgjrgarchengine.cpp > > seasonality.hpp > > > > b) Unresolved external > > We had a problem with the linker for > > const long *const PrimitivePolynomials[N_MAX_DEGREE]; > > > > coming from "primitivepolynonimals.h" / "primitivepolynominals.c" > > > > Somehow the linker didn't linke the function to the sobolrsg.cpp > > Couldn't find out why, but the nm-command showed the symbol twice: once > > defined and once undefined. > > > > After changing the file to .hpp and .cpp all worked fine. > > > > We addidionaly compiled the Swig for java, because we'll call from java > to > > calc theo option prices. > > For java we additionaly had to include -Kpic for the linker. > > > > I wanted to let you know of the these problems. > > Maybe there is a better way or maybe the ql can be adepted? I think the > > changes don't harm for other compilers? > > > > (By the way: we didn't have any problems on Windows) > > > > And thanx for the great work. We're using the lib only in a sample up to > > now, but that might change in the future... > > > > Best regards, > > Paul Rädle > > > > > > > > > > ------------------------------------------------------------------------- > > Deutsche Börse AG > > Chairman of the Supervisory Board/ > > Vorsitzender des Aufsichtsrats: > > Dr. Joachim Faber > > Executive Board/Vorstand: > > Dr. Reto Francioni (Chief Executive Officer/Vorsitzender), > > Andreas Preuss (Deputy Chief Executive Officer/ > > stellv. Vorsitzender), Gregor Pottmeyer, > > Hauke Stars, Jeffrey Tessler. > > Aktiengesellschaft with registered seat in/mit Sitz in > > Frankfurt am Main. > > Commercial register/Handelsregister: HRB 32232 > > Local court/Amtsgericht Frankfurt am Main. > > > > ----------------------------------------- > > Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte > Informationen. > > Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte > > sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren > > dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen > > ist nicht gestattet. > > > > The information contained in this message is confidential or protected by > > law. If you are not the intended recipient, please contact the sender and > > delete this message. Any unauthorised copying of this message or > > unauthorised distribution of the information contained herein is > prohibited. > > > > Legally required information for business correspondence/ > > Gesetzliche Pflichtangaben fuer Geschaeftskorrespondenz: > > http://deutsche-boerse.com/letterhead > > > > > > > ------------------------------------------------------------------------------ > > Try New Relic Now & We'll Send You this Cool Shirt > > New Relic is the only SaaS-based application performance monitoring > service > > that delivers powerful full stack analytics. Optimize and monitor your > > browser, app, & servers with just a few lines of code. Try New Relic > > and get this awesome Nerd Life shirt! > http://p.sf.net/sfu/newrelic_d2d_may > > _______________________________________________ > > QuantLib-dev mailing list > > Qua...@li... > > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > > > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > _______________________________________________ > QuantLib-dev mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-dev > |