Quantlib 1.14 and Quantlib1.14-SWIG: versions of Visual C++ prior to VC++10 (2010) are no longer supported

偶尔善良 提交于 2019-12-11 04:22:18

问题


I downloaded tarbals for both quantlib 1.14 and quantlib 1.14-swig. The quantlib folder under SWIG does contain the quantlib_wrap.cpp. But the setup complains the the MSC version. Here is the new error. This post is associated with another post on missing quantlib_wrap.cpp error message.

C:\Users\Public\3rdParty\Libraries\QuantLib-1.14\ql/config.msvc.hpp(29) : fatal error C1189: #error :  "versions of Visual C++ prior to VC++10 (2010) are no longer supported"
error: command 'C:\\Users\\U435169\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2.

Use 1.13. VC9 is no longer supported. – Luigi Ballabio

I will try 1.13 also. But actually, I do have VC++ 14.0 installed. I am using VS2015 to compile the quantlib. Not sure the true reason.

I did try the 1.13 and run into linking error. I think it might be from the inconsistency between the compile of quantlib-swig (VC9.0) and quantlib(VC14). If that is the case, how do we control the compiling version of quantlib-swig? Is there an option to control that?

C:\Users\U435169\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -D__WIN32__ -DWIN32 -DNDEBUG -D_WINDOWS -DNOMINMAX -ID:\packages\Python27\include -ID:\packages\Python27\PC -IC:\Users\Public\3rdParty\Libraries\QuantLib-1.13 -IC:\Users\Public\MSYS2\mingw32\include /TpQuantLib/quantlib_wrap.cpp /Fobuild\temp.win32-2.7\Release\QuantLib/quantlib_wrap.obj /GR /FD /Zm250 /EHsc /bigobj /MD
quantlib_wrap.cpp
C:\Users\U435169\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:D:\packages\Python27\libs /LIBPATH:D:\packages\Python27\PCbuild /LIBPATH:D:\packages\Python27\PC\VS9.0 /LIBPATH:C:\Users\Public\3rdParty\Libraries\QuantLib-1.13\lib /EXPORT:init_QuantLib build\temp.win32-2.7\Release\QuantLib/quantlib_wrap.obj /OUT:build\lib.win32-2.7\QuantLib\_QuantLib.pyd /IMPLIB:build\temp.win32-2.7\Release\QuantLib\_QuantLib.lib /MANIFESTFILE:build\temp.win32-2.7\Release\QuantLib\_QuantLib.pyd.manifest /subsystem:windows /machine:x86
LINK : fatal error LNK1104: cannot open file 'QuantLib-vc90-mt.lib'
error: command 'C:\\Users\\U435169\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\link.exe' failed with exit status 1104

回答1:


I'm guessing you're compiling the module for Python 2.7?

Python 2.7 for Windows is compiled with VC++ 2008 and uses it for compiling external modules as well. If you can switch to Python 3.5 or later instead, it will use your VC++ 2015 installation.



来源:https://stackoverflow.com/questions/53400935/quantlib-1-14-and-quantlib1-14-swig-versions-of-visual-c-prior-to-vc10-201

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!