windows python build

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

windows python build

Hugo Shi-2
Can anyone help?  I'm trying to build the python modules for quantlib.  Thanks in advanced.  Obviously something wierd is happening with the paths, I just don't know why this would be the case.



I've downloaded quantlib source, and built it in visual studio.  I've installed boost as well. 

I've set QL_DIR to c:\Lib\QuantLib-SWIG-0.9.9\
I've set BOOST_DIR t- c:\Program Files\boost\boost_1_39\


C:\lib\QuantLib-SWIG-0.9.9\Python>python.exe setup.py build
running build
running build_py
running build_ext
building 'QuantLib._QuantLib' extension
c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -D__WIN32__ -DWIN32 -DNDEBUG -D_WINDOWS -DNOMINMAX -Ic:\Python26
\include -Ic:\Python26\PC -IC:\lib\QuantLib-0.9.9 "-Ic:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\include\" "-Ic:\Program Files\Microsoft Visual S
tudio .NET 2003\SDK\v1.1\include\" /TpQuantLib/quantlib_wrap.cpp /Fobuild\temp.win32-2.6\Release\QuantLib/quantlib_wrap.obj /GR /FD /Zm250 /EHsc /MD
cl : Command line warning D9024 : unrecognized source file type 'Files\Microsoft', object file assumed
cl : Command line warning D9027 : source file 'Files\Microsoft' ignored
cl : Command line warning D9024 : unrecognized source file type 'Visual', object file assumed
cl : Command line warning D9027 : source file 'Visual' ignored
cl : Command line warning D9024 : unrecognized source file type 'Studio', object file assumed
cl : Command line warning D9027 : source file 'Studio' ignored
cl : Command line warning D9024 : unrecognized source file type '.NET', object file assumed
cl : Command line warning D9027 : source file '.NET' ignored
cl : Command line warning D9024 : unrecognized source file type '2003\SDK\v1.1\include"', object file assumed
cl : Command line warning D9027 : source file '2003\SDK\v1.1\include"' ignored
quantlib_wrap.cpp
C:\lib\QuantLib-0.9.9\ql/qldefines.hpp(29) : fatal error C1083: Cannot open include file: 'boost/config.hpp': No such file or directory
error: command '"c:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: windows python build

Luigi Ballabio
On Tue, 2010-02-16 at 13:52 -0600, Hugo Shi wrote:
> Can anyone help?  I'm trying to build the python modules for quantlib.
> Thanks in advanced.  Obviously something wierd is happening with the
> paths, I just don't know why this would be the case.

Yes, the spaces in the paths are not properly escaped and the compiler
splits them.  I'd try avoiding paths with spaces altogether.  What seems
to work for me is:

- install Boost in, say,  c:\boost\boost_1_39.
- don't set BOOST_DIR, since the setup script is not going to use it.
  Instead, use:

set INCLUDE=c:\boost\boost_1_39
python setup.py build

Hope this helps,
        Luigi


--

Do the right thing. It will gratify some people and astonish the rest.
-- Mark Twain



------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users