Re: Cannot build quantlib-swig python library

Posted by Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Cannot-build-quantlib-swig-python-library-tp7491p7494.html

On Mon, 2009-05-04 at 16:58 +0000, raphael wrote:

> I cannot build python.py. It cannot create quantlib_wrap_obj and thus gives the
> following error message:
>
> C:\QuantLib-SWIG-0.9.7\Python>python 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 /W
> 3 /GS- /DNDEBUG -D__WIN32__ -DWIN32 -DNDEBUG -D_WINDOWS -DNOMINMAX -IC:\Python26
> \include -IC:\Python26\PC -IC:\QuantLib-0.9.7 "-IC:\Program Files\Microsoft Visu
> al Studio 9.0\VC\INCLUDE" "-IC:\Program Files\Microsoft SDKs\Windows\v6.0A\inclu
> de" -I /TpQuantLib/quantlib_wrap.cpp /Fobuild\temp.win32-2.6\Release\QuantLib/qu
> antlib_wrap.obj /GR /FD /Zm250 /MD
> cl : Ligne de commande error D8003 : nom de fichier de la source absent
> error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' fa
> iled with exit status 2

Hi Raphael,
        Bojan's right---it's considering quantlib_wrap.cpp as an include path
and not as the source file to compile.  It's a problem in Python
distutils, and I've seen it happen on Windows when any of the include
directories contains spaces.  You can work around it by resetting your
INCLUDE variable; before running setup.py, run the command

set INCLUDE=

(with nothing after the = sign)

Luigi


--

Greenspun's Tenth Rule of Programming:
Any sufficiently complicated C or Fortran program contains an
ad-hoc, informally-specified bug-ridden slow implementation of
half of Common Lisp.



------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users