Skip to content

Building issue Win10x64 Python3.7.1 / x64 / VS2017 / QL1.15 / Boost 1.69  #252

@centurionb

Description

@centurionb

Hi,

Win10x64
Python 3.7.1
VS 2017
QL 1.15
Boost 1.69 (prebuilt boost_1_69_0-msvc-14.1-64.exe)

I followed the following instructions
https://pyql.readthedocs.io/en/latest/getting_started.html#installation-from-source-on-windows

1/ Step f.
I get lots of warnings although VS says the .dll has been built with success.
Why so many warnings ? Can we fix this ?

...
1>c:\lib\quantlib-1.15\ql\settings.hpp(38): warning C4275: non dll-interface class 'boost::noncopyable_::noncopyable' used as base for dll-interface class 'QuantLib::Singleton<QuantLib::Settings>' (compiling source file ql\settings.cpp)
1>c:\lib\boost_1_69_0\boost\core\noncopyable.hpp(38): note: see declaration of 'boost::noncopyable_::noncopyable' (compiling source file ql\settings.cpp)
1>c:\lib\quantlib-1.15\ql\settings.hpp(38): note: see declaration of 'QuantLib::Singleton<QuantLib::Settings>' (compiling source file ql\settings.cpp)
1>c:\lib\quantlib-1.15\ql\settings.hpp(112): warning C4251: 'QuantLib::Settings::evaluationDate_': class 'QuantLib::Settings::DateProxy' needs to have dll-interface to be used by clients of class 'QuantLib::Settings' (compiling source file ql\settings.cpp)
1>c:\lib\quantlib-1.15\ql\settings.hpp(42): note: see declaration of 'QuantLib::Settings::DateProxy' (compiling source file ql\settings.cpp)
1>c:\lib\quantlib-1.15\ql\settings.hpp(114): warning C4251: 'QuantLib::Settings::includeTodaysCashFlows_': class 'boost::optional<bool>' needs to have dll-interface to be used by clients of class 'QuantLib::Settings' (compiling source file ql\settings.cpp)
1>c:\lib\quantlib-1.15\ql\settings.hpp(106): note: see declaration of 'boost::optional<bool>' (compiling source file ql\settings.cpp)
1>c:\lib\quantlib-1.15\ql\settings.hpp(38): warning C4275: non dll-interface class 'boost::noncopyable_::noncopyable' used as base for dll-interface class 'QuantLib::Singleton<QuantLib::Settings>' (compiling source file ql\termstructure.cpp)
1>c:\lib\boost_1_69_0\boost\core\noncopyable.hpp(38): note: see declaration of 'boost::noncopyable_::noncopyable' (compiling source file ql\termstructure.cpp)
1>c:\lib\quantlib-1.15\ql\settings.hpp(38): note: see declaration of 'QuantLib::Singleton<QuantLib::Settings>' (compiling source file ql\termstructure.cpp)
1>c:\lib\quantlib-1.15\ql\settings.hpp(112): warning C4251: 'QuantLib::Settings::evaluationDate_': class 'QuantLib::Settings::DateProxy' needs to have dll-interface to be used by clients of class 'QuantLib::Settings' (compiling source file ql\termstructure.cpp)
1>c:\lib\quantlib-1.15\ql\settings.hpp(42): note: see declaration of 'QuantLib::Settings::DateProxy' (compiling source file ql\termstructure.cpp)
1>c:\lib\quantlib-1.15\ql\settings.hpp(114): warning C4251: 'QuantLib::Settings::includeTodaysCashFlows_': class 'boost::optional<bool>' needs to have dll-interface to be used by clients of class 'QuantLib::Settings' (compiling source file ql\termstructure.cpp)
1>c:\lib\quantlib-1.15\ql\settings.hpp(106): note: see declaration of 'boost::optional<bool>' (compiling source file ql\termstructure.cpp)
1>Make build directory
1>   Creating library .\lib\QuantLib-vc141-x64-mt.lib and object .\lib\QuantLib-vc141-x64-mt.exp
1>QuantLib.vcxproj -> C:\lib\QuantLib-1.15\.\lib\QuantLib-vc141-x64-mt.dll
1>Done building project "QuantLib.vcxproj".
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

2/ Step g.
I struggle generating the .def file
As I get MSVC14.1 I had to do the following amendment %d1 instead of %d0 to get the correct folder
input_directory = r"C:\lib\QuantLib-1.15\build\vc%d1\%s\Release" % ((VC_VERSION, ARCH))
C:\lib\QuantLib-1.15\build\vc141\x64\Release

However, at this stage I get the following errors

runfile('C:/lib/pyql-master/scripts/generate_symbols.py', wdir='C:/lib/pyql-master/scripts')
 QL_LIB: QuantLib-vc141-x64-mt
 VC: 14.1
 dir: C:\lib\QuantLib-1.15\build\vc141\x64\Release
Traceback (most recent call last):

  File "<ipython-input-1-1f79cc1c4531>", line 1, in <module>
    runfile('C:/lib/pyql-master/scripts/generate_symbols.py', wdir='C:/lib/pyql-master/scripts')
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile
    execfile(filename, namespace)
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)
  File "C:/lib/pyql-master/scripts/generate_symbols.py", line 101, in <module>
    main()
  File "C:/lib/pyql-master/scripts/generate_symbols.py", line 97, in main
    generate_deffile_from_dir(input_directory, output_file)
  File "C:/lib/pyql-master/scripts/generate_symbols.py", line 87, in generate_deffile_from_dir
    for symbol in process_directory(input_directory):
  File "C:/lib/pyql-master/scripts/generate_symbols.py", line 63, in process_directory
    for symbol in symbol_generator_from_obj_file(object_file):
  File "C:/lib/pyql-master/scripts/generate_symbols.py", line 20, in symbol_generator_from_obj_file
    nm_result = subprocess.check_output(command, startupinfo=startupinfo)
  File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 389, in check_output
    **kwargs).stdout
  File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 466, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 171, in __init__
    super(SubprocessPopen, self).__init__(*args, **kwargs)
  File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 769, in __init__
    restore_signals, start_new_session)
  File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 1172, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified


Any idea ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions