Help please anyone, I am stuck: I am using Dev-C++ 4.9.9.2.
I compiled the "QuantLib.dev" project file, which makes the file "libQuantLib-mgw-0_3_9.a",
That should prove that I have correctly installed Quantlib. Next I tried to create a new project, using all the same Project Options as given in project "Swap.dev".
Even if I do the (harmless) operation of editing out a single "cout" statement in the original Source File "swapvaluation.cpp", then "Swap.dev" no longer compiles. Typically, the intial lines of the Compile Log are as follows: "Compiler: Default compiler
Executing make...
g++.exe -c swapvaluation.cpp -o build/mingw/swapvaluation.o -I"X:/Dev-Cpp-4.9.9.2/lib" -I"lib/gcc/mingw32/3.4.2/include" -I"include/c++/3.4.2/backward" -I"include/c++/3.4.2/mingw32" -I"include/c++/3.4.2" -I"include" -I"X:/Dev-Cpp-4.9.9.2/boost" -I"X:/Dev-Cpp-4.9.9.2/libodbc" -D__GNUWIN32__ -W -fexceptions -finline-functions -DNDEBUG -DNOMINMAX -DWIN32 -D_CONSOLE -D_MBCS swapvaluation.cpp:26:27: ql/quantlib.hpp: No such file or directory
swapvaluation.cpp:44: error: expected `;' before "Calendar"
Any suggestions. Thanks Paul |
Hi, the error line that says "swapvaluation.cpp:26:27: ql/quantlib.hpp: No such file or directory " seems to indicate that the compiler cannot find the quantlib directory. This is normal, because the project options in swap.dev use relative paths. In your new project, go to "project options", then "directories". In "include directories, there must be something like "c:\the directory where you installed quantlib\" In "library directories", there must be stg like "c:\the directory where you installed quantlib\lib\" When you have entered the right parameters, the above error line should disappear and your project should compile. Karim
Help please anyone, I am stuck: I am using Dev-C++ 4.9.9.2.
I compiled the "QuantLib.dev" project
file, which makes the file "libQuantLib-mgw-0_3_9.a", That should prove that I have correctly installed Quantlib. Next I tried to create a new project, using
all the same Project Options as given in project "Swap.dev".
Even if I do the (harmless) operation of editing out a single "cout" statement in the original Source File "swapvaluation.cpp", then "Swap.dev" no longer compiles. Typically, the intial lines of the Compile Log are as follows: "Compiler:
Default compiler
Executing make...
g++.exe -c swapvaluation.cpp -o build/mingw/swapvaluation.o -I"X:/Dev-Cpp-4.9.9.2/lib" -I"lib/gcc/mingw32/3.4.2/include" -I"include/c++/3.4.2/backward" -I"include/c++/3.4.2/mingw32" -I"include/c++/3.4.2" -I"include" -I"X:/Dev-Cpp-4.9.9.2/boost" -I"X:/Dev-Cpp-4.9.9.2/libodbc" -D__GNUWIN32__ -W -fexceptions -finline-functions -DNDEBUG -DNOMINMAX -DWIN32 -D_CONSOLE -D_MBCS swapvaluation.cpp:26:27: ql/quantlib.hpp:
No such file or directory
swapvaluation.cpp:44: error: expected
`;' before "Calendar"
Any suggestions. Thanks Paul
|
In reply to this post by Bennett, Paul-2
Your problem is simple and more elusive than intuition would
indicated. The referrence directory is not picking up the necessary library: swapvaluation.cpp:26:27: ql/quantlib.hpp: No such file or directory. I came across the same problem. The problem comes down to this: QL is programmed for systems that utilize the forward facing slash, i.e. c:/..../ql/quantlib.hpp. Dev C++ is designed for Windows's standard backwards facing slash. I have not figured out how to resolve this in Dev C++ 4 or 5 (beta). I have tested this problem by changing the slash directions and by referencing the quantlib.hpp in multiple ways. One finds easily that quantlib.hpp can be referrenced by simply getting rid of the "ql/" and leaving "quantlib.hpp" in a referrenced directory. This then causes the problem that every called file from the quantlib.hpp file gives the directional slash problem. Terry and I have been trouble-shooting this problem for about two weeks through private emails. Perhaps someone knows how to resolve this. My answer has been to work on installing the programs on my BSD-based boxes, but this has proven difficult in some regards. Perhaps, assumign what all I have written here is correct, we should approach the Dev C++ 5 beta group and tell them of this directional slash problem. It seems easy to resolve, but perhaps not considering the stark difference between operating system conventions. David Brown Ph.D. Candidate Lehigh University NSF Fellow |
In reply to this post by Bennett, Paul-2
David,
Thanks for your reply. Looks like I can't use Dev-C++ 4.9.9.2 then! Paul -----Original Message----- From: David Brown [mailto:[hidden email]] Sent: Tuesday, July 05, 2005 5:41 PM To: Bennett, Paul Cc: [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? Your problem is simple and more elusive than intuition would indicated. The referrence directory is not picking up the necessary library: swapvaluation.cpp:26:27: ql/quantlib.hpp: No such file or directory. I came across the same problem. The problem comes down to this: QL is programmed for systems that utilize the forward facing slash, i.e. c:/..../ql/quantlib.hpp. Dev C++ is designed for Windows's standard backwards facing slash. I have not figured out how to resolve this in Dev C++ 4 or 5 (beta). I have tested this problem by changing the slash directions and by referencing the quantlib.hpp in multiple ways. One finds easily that quantlib.hpp can be referrenced by simply getting rid of the "ql/" and leaving "quantlib.hpp" in a referrenced directory. This then causes the problem that every called file from the quantlib.hpp file gives the directional slash problem. Terry and I have been trouble-shooting this problem for about two weeks through private emails. Perhaps someone knows how to resolve this. My answer has been to work on installing the programs on my BSD-based boxes, but this has proven difficult in some regards. Perhaps, assumign what all I have written here is correct, we should approach the Dev C++ 5 beta group and tell them of this directional slash problem. It seems easy to resolve, but perhaps not considering the stark difference between operating system conventions. David Brown Ph.D. Candidate Lehigh University NSF Fellow |
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 |
In reply to this post by Bennett, Paul-2
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 |
Free forum by Nabble | Edit this page |