Hi,
I have recently compiled QuantLib and QuantLibAddin on a Windows 64-bit platform (Visual Studio 2010, x64) and encountered a few difficulties while doing so, particularly in QuantLibAddin. Hopefully the information below will be useful for anybody wishing to use QuantLib on windows x64 platform in future.
(a) Initial attempts to build QuantLibAddin failed on the linking phase, because a definition for the function cppToLibrary(const long&, Natural&) could not be found. The issue arose because of the following code in the file QuantLibAddin/qlo/conversions/conversions.cpp, which resulted in the definition being skipped during compilation on our Windows x64 platform.
#if defined(__GNUC__) && defined(__x86_64__) void cppToLibrary(const long &in, QuantLib::Natural &ret) { ret = QuantLib::Natural(in); } #endif To fix this, I have updated the #if directive to check for a macro named _WIN64, which according to the MSDN website is pre-defined on all Windows 64-bit platforms. Maybe this fix can be merged into future QuantLib releases?
(b) Another issue I found was that, when upgrading the Visual Studio project from win32 to x64, the Targeted Machine (/MACHINE) project property was not automatically updated for static libraries. The property had to be updated manually, or else the build of log4cxx would fail at the linking stage. This is a bug with the Visual C++ IDE (dynamic library and executable projects are updated automatically).
(c) Finally I noticed that within QuantLib's "customised" log4cxx library (log4cxx0.10.0d) the APR code is dependent on a WIN32 macro definition (e.g. file apr.h). If this WIN32 macro is removed from the preprocesser definition for the 64-bit project the build of log4cxx will fail. Maybe it would make more sense if the code was re-written to instead check for the macro _WIN32, which is pre-defined and always available on all windows platforms (both 32-bit and 64-bit).
Would it be a good idea if windows x64-specific VC++ project and solution files were provided in future QuantLib releases? If so, I can potentially provide these.
Regards, Paul ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
On Fri, Dec 2, 2011 at 10:25 PM, Paul Giltinan
<[hidden email]> wrote: > I have recently compiled QuantLib and QuantLibAddin on a Windows 64-bit > platform (Visual Studio 2010, x64) and encountered a few difficulties while > doing so, particularly in QuantLibAddin. [...] > > Would it be a good idea if windows x64-specific VC++ project and solution > files were provided in future QuantLib releases? If so, I can potentially > provide these. Sure. May you add them as additional configurations of the existing projects? (Say, "Release x64" or something like it.) Once you're done, you can either post the files here or send them to me. If I may ask another favor, please don't base your updates on release 1.1. Check out the upcoming 1.2 release from the Subversion repository instead, so that your projects will be up to date and ready for inclusion when the release comes out. The 1.2 release can be checked out from <https://quantlib.svn.sourceforge.net/svnroot/quantlib/branches/R01020x-branch>. Thanks, Luigi ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by Paul Giltinan
I'm also trying to build QuantLibXL on a Windows 64-bit platform (VS 2010 x64). I have previously built QuantLib without any major issues, but I'm stuck when trying to get QuantLibXL to build. I followed your guidelines, but I'm not able to get rid of all the errors. This is the final error that I'm not able to get rid of (Same error occurs for several different source files):
8>C:\build_ql_1_1_0\ObjectHandler\oh/conversions/convert2.hpp(32): error C2738: 'operator QuantLib::Natural' : is ambiguous or is not a member of 'ObjectHandler::ConvertOper' 8> C:\build_ql_1_1_0\ObjectHandler\ohxl/convert_oper.hpp(50) : see declaration of 'ObjectHandler::ConvertOper' 8> C:\build_ql_1_1_0\ObjectHandler\oh/conversions/convert2.hpp(55) : see reference to function template instantiation 'value_t ObjectHandler::convert2<value_t,container_t>(const container_t &)' being compiled 8> with 8> [ 8> value_t=QuantLib::Natural, 8> container_t=ObjectHandler::ConvertOper 8> ] 8> functions\ctsmmcapletcalibration.cpp(293) : see reference to function template instantiation 'value_t ObjectHandler::convert2<QuantLib::Natural,ObjectHandler::ConvertOper>(const container_t &,const std::string &,const value_t &)' being compiled 8> with 8> [ 8> value_t=QuantLib::Natural, 8> container_t=ObjectHandler::ConvertOper 8> ] Did you encounter the same error? I looked through the source files in the SVN depository to see if you made the updates you outlined, but I couldn't find anything. Can you elaborate on what changes you made to the conversion.cpp/hpp files? Best regards Jorgen |
Free forum by Nabble | Edit this page |