简体   繁体   中英

QuantLib 1.9 Fatal Error when Build Python

I had QuantLib 1.9 built already (succeeded), then I tried to install QuantLib-Python from SWIG 1.9. I worked with VS2015,boost_1_62_0 (msvs-14.0 32bit), Anaconda3, QuantLib-1.9, QuantLib-SWIG-1.9 and swigwin-3.0.10,all in the same folder.

When I did "python setup.py build" in dev command prompt for vs2015, I came across the error: Link: fatal error LINK1104:cannot open file 'QuantLib-vc140-mt.lib'. So I went to QuantLib-lib folder, found that the lib file in there is called "QuantLib-vc140-mt-gd.lib". I make a copy of it and renamed it to 'QuantLib-vc140-mt.lib'and ran build command again, this time it ran longer but I got this new error under some of the obj files "quantlib fatal error LNK2001:unresolved external symbol___imp___CrtDbgReportW"

I am really new to the subject and would really appreciate if someone could shed some light on this.

As you found out, you can't just rename the library. When you compiled QuantLib, you chose the "Debug" configuration, which gave you QuantLib-vc140-mt-gd.lib . To get the QuantLib-vc140-mt.lib that Python is asking for, use the "Release" configuration instead. (Incidentally, the compiled library will also be a lot faster...)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM