Unresolved external symbol when building python

Posted by tglauner on
URL: http://quantlib.414.s1.nabble.com/Unresolved-external-symbol-when-building-python-tp8089.html

I am trying to use the Python wrapper for Quantlib but have trouble building and installing the python part. I am on XP and use VS 2008 with boost 34.

Could you please guide me on how to fix this.
Tim

Here is the error:
C:\Program Files\QuantLib-SWIG-0.9.7\Python>python setup.py build test
running build
running build_py
not copying QuantLib\__init__.py (output up-to-date)
not copying QuantLib\__init__.py (output up-to-date)
not copying QuantLib\QuantLib.py (output up-to-date)
running build_ext
building 'QuantLib._QuantLib' extension
Calling 'vcvarsall.bat x86' (version=9.0)
skipping QuantLib/quantlib_wrap.cpp (build\temp.win32-2.6\Release\QuantLib/quantlib_wrap.obj up-to-date)
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:\Program Files\QuantLib-0.9.7\lib" "/LIBPATH:C:\Program Files\boost\boost_1_34_0" /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,class std::allocator<void> >::operator()(double)const " (??R?$function1@NNV?$allocator@X@std@@@boost@@QBENN@Z)
build\lib.win32-2.6\QuantLib\_QuantLib.pyd : fatal error LNK1120: 1 unresolved externals
error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe"' failed with exit status 1120