[ quantlib-Bugs-2797119 ] Failure to compile Python ext. - Visual C++ 2008, Boost 1.39

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ quantlib-Bugs-2797119 ] Failure to compile Python ext. - Visual C++ 2008, Boost 1.39

SourceForge.net
Bugs item #2797119, was opened at 2009-05-27 02:11
Message generated for change (Settings changed) made by lballabio
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2797119&group_id=12740

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: pm13 (pm13)
>Assigned to: Luigi Ballabio (lballabio)
Summary: Failure to compile Python ext. - Visual C++ 2008, Boost 1.39

Initial Comment:
I tried to compile Python extensions for QuantLib in Windows XP SP3. I used Visual C++ 2008 Express Edition, Python 2.6.2, Boost 1.39.0, Boost Jam 3.1.17, QuantLib 0.9.7 and QuantLib-SWIG 0.9.7.

My steps:
1. Install Visual C++
2. Install Python
3. Extract Boost and Boost Jam, compile Boost (bjam.exe install)
4. Extract QuantLib, copy Boost headers and compiled libraries to the extracted directory, compile QuantLib in Visual Studio
5. Extract QuantLib-SWIG, set QL_DIR to the extracted directory, try to compile Python extensions (python.exe setup.py install)

I am not sure if it is the right procedure. But it could be - it works with different version of Boost and with a little patch.

In the last step (python.exe setup.py install) I got this exception (and much more, see the attachment):
C:\QuantLib-0.9.7\boost/function/function_template.hpp(80) : error C2143: syntax error : missing ';' before 'namespace'

C:\QuantLib-0.9.7\boost/function/function_template.hpp(980) : error C2838: '()' : illegal qualified name in member declaration

        C:\QuantLib-0.9.7\boost/function/function_template.hpp(80) : see reference to class template instantiation 'boost::function0<R>' being compiled

C:\QuantLib-0.9.7\boost/function/function_template.hpp(995) : error C2804: binary 'operator ==' has too many parameters

C:\QuantLib-0.9.7\boost/function/function_template.hpp(1002) : error C2804: binary 'operator !=' has too many parameters

C:\QuantLib-0.9.7\boost/function/function_template.hpp(1098) : error C2764: 'R' : template parameter not used or deducible in partial specialization 'boost::function<R(void)>'

C:\QuantLib-0.9.7\boost/function/function_template.hpp(1098) : error C3412: 'boost::function<R(void)>' : cannot specialize template in current scope


Maybe there is a simple solution (I almost don't know C++) but I only found following link and I went around the problem by using Boost 1.36.0:
http://thread.gmane.org/gmane.comp.lib.boost.user/42699


----------------------------------------------------------------------

>Comment By: Luigi Ballabio (lballabio)
Date: 2009-09-29 11:52

Message:
Strangely enough, the fix you suggested with Boost 1.36 also fixed this
issue.

----------------------------------------------------------------------

Comment By: pm13 (pm13)
Date: 2009-05-27 02:12

Message:
The whole title should be:
Failure to compile Python extensions with Visual C++ 2008 and Boost 1.39.0

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2797119&group_id=12740

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev