0

I have successfully built Quantlib on Windows using Visual Studio 2015 and want to build Quantlib-SWIG for Python. However, I am repeatedly getting Link:1104 error. I went through the following steps:

  1. Ran "Anaconda Prompt" from Start Menu. In the console window, changed directory to cd "C:\QuantLib-SWIG-1.10\Python" and set the following environment variables:

     set INCLUDE="C:\boost_1_63_0"
    
     set LIB="C:\boost_1_63_0\lib64-msvc-14.0"
    
     set QL_DIR="C:\QuantLib-1.10"
    
  2. From within the Anaconda console window, I ran the this command:

    python setup.py build
    

I got fatal error 1104: cannot open file 'QuantLib-vc140-x64-mt.lib'

I will be grateful to someone who can explain what is going on here and how can I fix it.

Many thanks.

Kashif
  • 1
  • Why don't you set the environment variables so that when your run "python" it runs from the folder: "C:\QuantLib-SWIG-1.10"? Or have you already done this? – KingJohnno Sep 24 '17 at 12:26
  • Thanks for your help. I installed anaconda and it set the environment variables automatically like this: C:\Users\Kashif\Anaconda3;C:\Users\Kashif\Anaconda3\Library\mingw-w64\bin;C:\Users\Kashif\Anaconda3\Library\usr\bin;C:\Users\Kashif\Anaconda3\Library\bin;C:\Users\Kashif\Anaconda3\Scripts. Do you mean I should add C:\QuantLib-SWIG-1.10" to the path? – Kashif Sep 24 '17 at 12:51
  • yes - try that and see what happens. – KingJohnno Sep 24 '17 at 15:03
  • Do you have the file `QuantLib-vc140-x64-mt.lib` in `C:\QuantLib-1.10\lib`? – Luigi Ballabio Sep 25 '17 at 11:06
  • @KingJohnno and @ Luigi Ballabio Thank you both for your valuable comments. I managed to fix the issue by changing the name from `QuantLib-vc140-mt.lib` to `QuantLib-vc140-x64-mt.lib`. – Kashif Sep 25 '17 at 18:02

0 Answers0