Re: Compilation of QuantLibAddin

Posted by eric ehlers on
URL: http://quantlib.414.s1.nabble.com/Compilation-of-QuantLibAddin-tp561p562.html

Hi Claudio,

On 1/28/07, Ortelli Claudio <[hidden email]> wrote:

>
> Dear Quantlib users,
>
> I would like to use QuantLib under MS Excel. To this end I
> have followed the steps described in the "Build Tutorial" of
> QuantLibAddin (http://quantlib.org/quantlibaddin/build_tutorial.html),
> i.e. I have:
>
> 1) Installed Visual C++ and the SDK
> 2) Installed Python 2.4.4
> 3) Installed and Built Boost
> 4) Installed and Built QuantLib
>    The QuantLib Testsuite ran successfully.
>
>    However, the tutorial says that
>    " ... In other words the QuantLibAddin compilation will expect to find
>        * QuantLib header files in directory $(QL_DIR)\include
>        * QuantLib lib file QuantLib-vc80-mt-s-0_3_14.lib in directory $(QL_DIR)\lib"
>
>    But, after both compiling and successfully testing QuantLib the directory $(QL_DIR)\include does not
>    exist. Is that normal?

That's a mistake in the document.  It should say $(QL_DIR)\ql.

You need to manually set the environment variable QL_DIR to the top
level QuantLib directory.  for example, on my machine, QuantLib is
installed to
    C:\projects\QuantLib
and I've set the value of environment variable QL_DIR equal to the above string.

> 5) Installed and built log4cxx
>    the build process created the file "log4cxx-0.9.7b\msvc\lib\log4cxxs-vc80-mt-s.lib" as expected.
>
> 6) Installed gensrc
> 7) Installed and built ObjectHandler
>    Compilation was successfully completed.
>    However, while the tutorial says that
>    * "The build process creates file ObjectHandler\ohxl\ohxllib\lib\ObjectHandler-vc80-mt-s-0_1_5.lib."
>       the folder ObjectHandler-0.1.5 contains only "\ohxl\ohxllib\" and not "\lib\". Is that normal?
>
>    * After compilation the ObjectHandler-0.1.5\lib\ folder contains two files:
>      "ObjectHandler-xllib-vc80-mt-s-0_1_5.lib" and
>      "xlsdk-vc80-mt-s.lib"
>      but the file "ObjectHandler-vc80-mt-s-0_1_5.lib" does not exist.

The documentation of the ObjectHandler directories is wrong, and all
the files you identify above are correct.  We shuffled things around
and I forgot to update the document.

> 8) Installed QuantLibAddin-0.3.14.exe and QuantLibXL-src-0.3.14.exe, built QuantLibAddin
>
>    Compilation of QuantLibAddin failed. I obtained the following errors:
>
>    1)
>    couponvectors.cpp
>    .\qlo\couponvectors.cpp(76) : error C2039: 'SimpleCashFlow' : is not a member of 'QuantLib'

That I don't understand.  Near the top of file
    QuantLibAddin\qlo\couponvectors.cpp
it says
    #include <ql/CashFlows/simplecashflow.hpp>
Which, assuming QL_DIR is set correctly, should cause you to pick up file
    QuantLib\ql\CashFlows\simplecashflow.hpp
which of course contains the definition of SimpleCashFlow.

The #include of ql/CashFlows/simplecashflow.hpp must have succeeded
because otherwise the error message would have been

.\qlo\couponvectors.cpp(31) : fatal error C1083: Cannot open include
file: 'ql/CashFlows/simplecashflow.hpp': No such file or directory

So I can't understand why the #include succeeded, but the compilation
failed.  Is QL_DIR pointing to an older version of QuantLib or
something?

Apologies for the errors in the documentation, that will be fixed shortly.

Regards,
Eric

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users