Login  Register

Re: 答复: Having trouble building QuantLib-SWIG python

Posted by ohmeninea on Mar 30, 2015; 7:16pm
URL: http://quantlib.414.s1.nabble.com/Having-trouble-building-QuantLib-SWIG-python-tp15851p16423.html

Didrik Pinte-5 wrote
On 27 March 2015 at 16:17, ohmeninea <omega1337@gmail.com> wrote:

> @Luigi B. -- Building from git master checkout
>
> @Didrik -- This did the trick (initially). Now I'm getting the following
> error (I changed /machine:i386 in setup.py  to /machine:x64, since I'm
> using
> 64-bit and I've built 64-bit quantlib in VS2008)
>

I bet your command line tools are not set for using the 64bit programs. Can
you try again but type this just after staring the MSVC command line:

vcvarsall amd64

and then compile the swig wrappers

-- Didrik

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website,
sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for
all
things parallel software development, from weekly thought leadership blogs
to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Quoted from:
http://quantlib.10058.n7.nabble.com/Having-trouble-building-QuantLib-SWIG-python-tp15851p16422.html

Right again, Didrik!
Since I have VS2008 Express it was missing vcvarsamd64.bat, but I found one elsewhere, copied it into the VC9 folder, and called "vcvarsamd64" before running "python setup.py wrap" & "build."

At first I got this:

C:\dev\QuantLib-SWIG\Python>python setup.py build
running build
running build_py
running build_ext
building 'QuantLib._QuantLib' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nolog
o /Ox /MD /W3 /GS- /DNDEBUG -D__WIN32__ -DWIN32 -DNDEBUG -D_WINDOWS -DNOMINMAX -
IC:\Python27\include -IC:\Python27\PC -IC:\dev\QuantLib-1.5 "-IC:\Program Files
(x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\M
icrosoft Visual Studio 9.0\VC\INCLUDE" "-IC:\Program Files\Microsoft SDKs\Window
s\v6.0A\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC
\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE" "-IC
:\Program Files\Microsoft SDKs\Windows\v6.0A\include" -IC:\dev\boost_1_57_0 /TpQ
uantLib/quantlib_wrap.cpp /Fobuild\temp.win-amd64-2.7\Release\QuantLib/quantlib_
wrap.obj /GR /FD /Zm250 /EHsc /MD
quantlib_wrap.cpp
C:\dev\boost_1_57_0\boost/type_index.hpp(37) : warning C4068: unknown pragma
c:\program files (x86)\microsoft visual studio 9.0\vc\include\memory(404) : fata
l error C1128: number of sections exceeded object file format limit : compile wi
th /bigobj
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\BIN\\a
md64\\cl.exe' failed with exit status 1

So I added "/bigobj" to the extra_compile_args list and it worked.

Thanks again, Didrik!