Unresolved external symbol when building python

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unresolved external symbol when building python

tglauner
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

Reply | Threaded
Open this post in threaded view
|

Re: Unresolved external symbol when building python

tglauner
I actually resolved the issue by adding '/EHsc' to the extra compile flags. Apologies for the original post.
Reply | Threaded
Open this post in threaded view
|

Re: Unresolved external symbol when building python

Luigi Ballabio
On Mon, 2009-10-19 at 19:01 -0700, tglauner wrote:
> I actually resolved the issue by adding '/EHsc' to the extra compile flags.
> Apologies for the original post.

No apologies required--in fact, it's good to have the problem and
solution archived here.

Luigi


--

Present to inform, not to impress; if you inform, you will impress.
-- Fred Brooks



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) 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/devconference
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users