bondgeek / pybg

9 stars 0 forks source link

Windows build fails #13

Open RayVR opened 10 years ago

RayVR commented 10 years ago

```Error compiling Cython file:

    raise ValueError(
        'Interpolator must be one of {}'.format(VALID_INTERPOLATORS)
    )

# convert rate_helpers list to std::vetor
cdef vector[shared_ptr[RateHelper]]* curve_inputs = new vector[shared_ptr[RateHelper]]()```

pybg\quantlib\termstructures\yields\piecewise_yield_curve.pyx:38:78: Python object type 'RateHelper' cannot be used as a template argument Traceback (most recent call last): File "setup_win.py", line 90, in <module> for extname, extsources in extension_paths_lib File "c:\Anaconda64\lib\site-packages\Cython\Build\Dependencies.py", line 778, in cythonize cythonize_one(*args[1:]) File "c:\Anaconda64\lib\site-packages\Cython\Build\Dependencies.py", line 895, in cythonize_one raise CompileError(None, pyx_file) Cython.Compiler.Errors.CompileError: pybg/quantlib/termstructures/yields/piecewise_yield_curve.pyx make: *** [build_win] Error 1

RayVR commented 10 years ago

Hmm, just noticed the msvc solution file and it looks like the only support is for 32bit builds. Any reason for not supporting x64 here?

bondgeek commented 10 years ago

No good reason, just wasn't needed. I'm certainly willing to add it if you want to work on it. The time may be better spent getting the windows build working for https://github.com/enthought/pyql. That project has progressed a good bit since I did this.

Unfortunately, however, the problems with the windows build are not trivial. Getting QuantLib's Settings singleton to act properly was a problem--I ended up hacking a work around.

RayVR commented 10 years ago

I've messed around some with pyql but the compilation fails on something I think you found (attempt to use QuantLib.lib). Not sure how to resolve the issue right now.

OmarArain commented 10 years ago

I'm seeing the exact same problem as @RayVR above. I'm using 32bit python, trying to build a 32 bit extension.
I then opened the msvc solution and successfully built all the projects from there. Now how do I install the python extension? I try running "python setup_win.py build_Ext --inplace" but again I end up with the same errors as @RayVR above. Is it possible to use pybg on Windows x86? If so, how?

Thanks.