Bugs item #2797120, was opened at 2009-05-27 02:16
Message generated for change (Settings changed) made by lballabio You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2797120&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.36 Initial Comment: The whole title should be: Failure to compile Python extensions with Visual C++ 2008 and Boost 1.36.0 without change in setup.py (This is almost the same as an another bug, difference is in the version of Boost). 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.36.0, Boost Jam 3.1.16, 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 a little patch. In the last step (python.exe setup.py install) I got this exception (more in the first attachment): C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Python26\libs /LIBPATH:C:\Python26\PCbuild /LIBPATH:C:\QuantLib-0.9.7\lib /EXPORT:init_QuantLib build\temp.win32-2.6\Release\QuantLib/quantlib_wrap.obj /OUT:build\lib.win32-2.6\QuantLib\_QuantLib.pyd /IMPLIB:build\temp.win32-2.6\Release\QuantLib\_QuantLib.lib /MANIFESTFILE:build\temp.win32-2.6\Release\QuantLib\_QuantLib.pyd.manifest /subsystem:windows /machine:I386 Creating library build\temp.win32-2.6\Release\QuantLib\_QuantLib.lib and object build\temp.win32-2.6\Release\QuantLib\_QuantLib.exp quantlib_wrap.obj : error LNK2019: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXABVexception@std@@@Z) referenced in function "public: double __thiscall boost::function1<double,double>::operator()(double)const " (??R?$function1@NN@boost@@QBENN@Z) build\lib.win32-2.6\QuantLib\_QuantLib.pyd : fatal error LNK1120: 1 unresolved externals I used the advice and I added "/EHsc" to extra_compile_args: extra_compile_args = ['/GR', '/FD', '/Zm250', '/EHsc'] With changed setup.py I was able to compile Python extensions (more in the second attachment) and tests passed (python.exe setup.py test). ---------------------------------------------------------------------- Comment By: Luigi Ballabio (lballabio) Date: 2009-09-29 11:12 Message: The patch was applied to the Subversion repository. Thank you for the report and the fix. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112740&aid=2797120&group_id=12740 ------------------------------------------------------------------------------ Come build with us! The BlackBerry® 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-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ QuantLib-dev mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-dev |
Free forum by Nabble | Edit this page |