Login  Register

RE: Installing QuantLib using Dev-C++ 4.9.9.2: WORKING

Posted by Bennett, Paul-2 on Jul 06, 2005; 12:17am
URL: http://quantlib.414.s1.nabble.com/Installing-QuantLib-using-Dev-C-4-9-9-2-the-examples-compile-though-I-cannot-compile-any-new-project-tp3891p3892.html

Luigi, Karim,

You were both right, thanks for you replies.  I got QuantLib to work using Dev-C++ 4.9.9.2 as follows:

(1) Install Dev-Cpp-4.9.9.2 into a folder of the same name.
(2) Copy the Boost library folder "\boost" into the same folder.
(3) Copy the QuantLib library folder "\ql" into the same folder.

This gives the following directory structure:

DRIVE FOLDER SUBFOLDER
X: \Dev-Cpp-4.9.9.2 \bin
                                \boost (from Boost version 1.32.0)
                                \build
                                \Help
                                \Icons
                                \include
                                \Lang
                                \lib
                                \libexec
                                \mingw32
                                \Packages
                                \ql (from QuantLib version 0.3.9)
                                \Templates

(4) Set Dev-C++ 4.9.9.2 "Tools -> Compiler Options" to have the following:
        Directories: Binaries: X:\Dev-Cpp-4.9.9.2\bin
                                Libraries: X:\Dev-Cpp-4.9.9.2
                                C Includes: X:\Dev-Cpp-4.9.9.2
                                C++ Includes: X:\Dev-Cpp-4.9.9.2

(5) Now open the project file "QuantLib.dev", found in the top directory where the QuantLib files were extracted.
Then "Execute -> Compile". This will create a file "\lib\lib\libQuantLib-mgw-0_3_9.a" in the QuantLib extract directory.  
Save a copy of this file in folder "X:\Dec-Cpp-4.9.9.2\lib".

All done.  To compile any Quantlib project just set the following Project Options:

(6) Within any "*.dev" file, set the "Project -> Project Options" to:
        Parameters: Compiler: -D__GNUWIN32__ -W -fexceptions -finline-functions -DNDEBUG -DWIN32 -D_CONSOLE -D_MBCS -DNOMINMAX
                                C++ compiler: -D__GNUWIN32__ -W -fexceptions -finline-functions -DNDEBUG -DWIN32 -D_CONSOLE -D_MBCS -DNOMINMAX
                                Linker: -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 -lQuantLib-mgw-0_3_9

        Parameters: Compiler: None
                                C++ compiler: None
                                Linker: None

        Directories: Library Directories: None
                                Include Directories: None
                                Resource Directories: None

This worked for me.

Regards,

Paul


-----Original Message-----
From: Luigi Ballabio [mailto:[hidden email]]
Sent: Tuesday, July 05, 2005 6:58 PM
To: Bennett, Paul
Cc: David Brown; [hidden email]
Subject: Re: [Quantlib-users] Installing QuantLib using Dev-C++ 4.9.9.2:
the examples compile, though I cannot compile any new project - can
anyone help?



On 07/05/2005 12:05:01 PM, Bennett, Paul wrote:
>
> Looks like I can't use Dev-C++ 4.9.9.2 then!

No, it should work. Dev-C++ is just an IDE; managing statements such as
#include <ql/quantlib.hpp>
is solely responsibility of the C preprocessor, which is the one  
included in the gcc suite and AFAIK handles forward slashes without  
problems (you couldn't even compile the library if it didn't.)

Your problem should be just one of include paths; see Karim's post for  
the solution.

Later,
        Luigi

----------------------------------------

I have made this letter longer than usual, only because I have not had  
the time to make it shorter.
-- B. Pascal