Re: Building QuantLib for Python on Win XP

Posted by newbie73 on
URL: http://quantlib.414.s1.nabble.com/Building-QuantLib-for-Python-on-Win-XP-tp1356p1359.html

My boost installation dir is:

c:\boost (this is how I set it in my Visual Studio settings as well).

When I try:

set CL="c:\boost"

I still get an error:

cl : unrecognized source file type 'c:\boost', object file assumed
cl: source file 'c:\boost' ignored

Then the same error regarding unfound boost files shows up.

Any more suggestions?

Luigi Ballabio wrote
On Fri, 2007-09-14 at 11:01 -0700, newbie73 wrote:
> I have compiled (in release mode) the QuantLib .8.1 library.  Now I am trying
> to run the Python installation with: python setup.py install in the
> Swig/Python directory.  I have set QL_DIR = C:\QuantLib, although the actual
> built files are in c:\QuantLib\bin\Release
>
> Python tries to load the boost libraries but is unable to find them and
> throws the error:
>
> Cannot open include file: 'boost/config.hpp'
>
> Shouldn't the setup.py script be using the pre-compiled binaries instead of
> rebuilding the libraries from source?

QL_DIR is ok. setup.py uses the compiled binaries, but it also has to
compile the Python wrappers (i.e., quantlib_wrap.cpp in the directory
QuantLib-SWIG\Python\QuantLib.) Since they include Boost headers, you
need to tell the compiler where to find them. One way to do it is to
define the environment variable CL to be the location of your Boost
installation, e.g., C:\Boost\boost_1_34_1).

Luigi


--

Glendower: I can call spirits from the vasty deep.
Hotspur: Why, so can I, or so can any man;
But will they come when you do call for them?
-- King Henry the Fourth Part I, Act III, Scene I



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-users mailing list
QuantLib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quantlib-users