[ quantlib-Bugs-2797119 ] Failure to compile Python extensions with Visual C++ 2008 an

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

[ quantlib-Bugs-2797119 ] Failure to compile Python extensions with Visual C++ 2008 an

SourceForge.net
Bugs item #2797119, was opened at 2009-05-27 02:11
Message generated for change (Comment added) made by pm13
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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: pm13 (pm13)
Assigned to: Nobody/Anonymous (nobody)
Summary: Failure to compile Python extensions with Visual C++ 2008 an

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: 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

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev