You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add the compiler flag /D QL_HIGH_RESOLUTION_DATE when building QuantLib so that QuantLib::Hour etc. were defined
add the same compiler flag in setup.py get_define_macros()
Put a guard: if sys.platform != 'win32': around the compiler_so code in setup.py pyql_build_ext.build_extensions(), since this code is *nix specific (I think)
Install cygwin with the binutils package in order to get nm (a *nix utility for examining binary files). Put the nm location in your PATH or amend generate_symbols.py symbol_generator_from_obj_file() sp that command = [r'<wherever your cygwin install puts nm\nm', '--extern-only', '--defined-only', object_file]
Futz around with the lib names etc; see this issue
I could then follow the build, def file, build instructions, and subsequently run python setup.py build_ext --inplace or python setup.py build.
When I tried to run the tests I got a bunch of errors all very similar to this:
ImportError: Failed to import test module: quantlib.test.test_zero_coupon
Traceback (most recent call last):
File "C:\Users\wxf\Continuum\anaconda3\envs\gresham_pyql\lib\unittest\loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "C:\Users\wxf\Continuum\anaconda3\envs\gresham_pyql\lib\unittest\loader.py", line 369, in _get_module_from_name import(name)
File "d:\dev\pyql\quantlib\test\test_zero_coupon.py", line 3, in
from quantlib.settings import Settings
ImportError: DLL load failed: %1 is not a valid Win32 application.
which seems to suggest some sort of 32bit vs x64 conflict, but I can't work out why. Can anyone help?
This is some output from the build stage which seems to indicate that the 64 bit compiler is being used:
I'm trying to build pyql for WIN32 x64 in the following environment:
I followed the instructions here
but had to make a few additional tweaks:
I could then follow the build, def file, build instructions, and subsequently run python setup.py build_ext --inplace or python setup.py build.
When I tried to run the tests I got a bunch of errors all very similar to this:
======================================================================
ERROR: quantlib.test.test_zero_coupon (unittest.loader._FailedTest)
ImportError: Failed to import test module: quantlib.test.test_zero_coupon
Traceback (most recent call last):
File "C:\Users\wxf\Continuum\anaconda3\envs\gresham_pyql\lib\unittest\loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "C:\Users\wxf\Continuum\anaconda3\envs\gresham_pyql\lib\unittest\loader.py", line 369, in _get_module_from_name
import(name)
File "d:\dev\pyql\quantlib\test\test_zero_coupon.py", line 3, in
from quantlib.settings import Settings
ImportError: DLL load failed: %1 is not a valid Win32 application.
which seems to suggest some sort of 32bit vs x64 conflict, but I can't work out why. Can anyone help?
This is some output from the build stage which seems to indicate that the 64 bit compiler is being used:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -D_WIN64 -DWIN64 -DNDEBUG -D_WINDOWS -DNOMINMAX -DWINNT -D_WINDLL -D_SCL_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -DQL_HIGH_RESOLUTION_DATE -ID:\lib\QuantLib-1.16 -ID:\lib\boost_1_71_0 -I. -I./cpp_layer -IC:\Users\wxf\Continuum\anaconda3\envs\gresham_pyql\lib\site-packages\numpy\core\include -IC:\Users\wxf\Continuum\anaconda3\envs\gresham_pyql\include -IC:\Users\wxf\Continuum\anaconda3\envs\gresham_pyql\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tpcpp_layer/constraint_support_code.cpp /Fobuild\temp.win-amd64-3.6\Release\cpp_layer/constraint_support_code.obj /GR /FD /Zm250 /EHsc
constraint_support_code.cpp
The text was updated successfully, but these errors were encountered: