Hi,
I started using Quantlib version 0.3.4 under Linux. Under Linux I created my own project based on standard Makefiles. The project uses the quantlib library and everything works fine. Now, I also need to support Microsoft Visual C++ 6.0 on Windows (NT4). Here, I set up a separate new project, which includes my source files and I tried to link in the quantlib library in the same way as the Quantlib Examples (AmericanOption) are doing it. In particular, I compared all the project settings of the quantlib example with mine and adjusted my own project settings accordingly. However, I cannot get my stuff compiled. Visual C++ is complaining about the "Use RTTI" option not being checked. As a matter of fact, however, the "Enable RTTI" option is checked. The reason seems to be that the preprocessor symbol _CPPRTTI referenced in ql\config.msvc.hpp is not defined. Defining this symbol manually leads to an uncounted number of error messages, such as "... 'false' : undeclared identifier", "expected constant expression" or "... 'int ' : no members defined using this type", which are raised in standard VC++ include files such as limits (most of them there) or iosfwd. I am really starting to become desperate about this, especially because the stuff seamlessly compiles and runs under Linux. Is there anybody out there who might be able to help me with the problem or does anybody know about a HOWTO, which details how to use quantlib in a Visual C++ project. Please let me know if you need additional detailled information about my project setup. Thanks in advance, wpe |
Hi Walter
>I started using Quantlib version 0.3.4 under Linux. is there a strong reason about using 0.3.4 instead of the latest 0.3.7? >I also need to support Microsoft Visual C++ 6.0 on Windows (NT4). [...] >However, I cannot get my stuff compiled. Visual C++ is complaining about the >"Use RTTI" option not being checked. under project settings, "C/C++" tab, "C++ Language", you have to check the "Use RTTI" option. See http://www.quantlib.org/reference/usage.html ciao -- Nando |
In reply to this post by Penschke, Walter
Hi Nando,
currently I can only spend a fraction of my time to my Quantlib project. I therefore started already a couple of month ago using version 0.3.4. My code base did not compile out-of-the-box with the latest release. So I decided to stay with 0.3.4. Would you recommend to go for the latest release? wpe -----Original Message----- From: Ferdinando Ametrano [mailto:[hidden email]] Sent: Monday, August 16, 2004 5:08 PM To: Penschke, Walter; '[hidden email]' Subject: Re: [Quantlib-users] Problem using QL 0.3.4 under MS-VC++ 6.0 Hi Walter >I started using Quantlib version 0.3.4 under Linux. is there a strong reason about using 0.3.4 instead of the latest 0.3.7? >I also need to support Microsoft Visual C++ 6.0 on Windows (NT4). [...] >However, I cannot get my stuff compiled. Visual C++ is complaining about the >"Use RTTI" option not being checked. under project settings, "C/C++" tab, "C++ Language", you have to check the "Use RTTI" option. See http://www.quantlib.org/reference/usage.html ciao -- Nando |
Hi Walter,
>I can only spend a fraction of my time to my Quantlib project. I >therefore started already a couple of month ago using version 0.3.4. My code >base did not compile out-of-the-box with the latest release. So I decided to >stay with 0.3.4. > >Would you recommend to go for the latest release? as far as QuantLib itself is concerned I would suggest 0.3.7, especially because 0.3.4 is quite old. Should you move to 0.3.7 take the extra step to define QL_DISABLE_DEPRECATED in order to disable all deprecated features that will be removed in the next release. Of course the last answer depends on the details of your QuantLib project... ciao -- Nando PS contribute your stuff to QuantLib along with a unit-test and they will be maintained for free by the QuantLib team ;-) |
In reply to this post by Penschke, Walter
Ok,
I gonna give the latest recommended version 0.3.7 a go then. My code base is pretty small, so the step (hopefully) is feasible. thx wpe -----Original Message----- From: Ferdinando Ametrano [mailto:[hidden email]] Sent: Monday, August 16, 2004 5:27 PM To: Penschke, Walter; '[hidden email]' Subject: RE: [Quantlib-users] Problem using QL 0.3.4 under MS-VC++ 6.0 Hi Walter, >I can only spend a fraction of my time to my Quantlib project. I >therefore started already a couple of month ago using version 0.3.4. My code >base did not compile out-of-the-box with the latest release. So I decided to >stay with 0.3.4. > >Would you recommend to go for the latest release? as far as QuantLib itself is concerned I would suggest 0.3.7, especially because 0.3.4 is quite old. Should you move to 0.3.7 take the extra step to define QL_DISABLE_DEPRECATED in order to disable all deprecated features that will be removed in the next release. Of course the last answer depends on the details of your QuantLib project... ciao -- Nando PS contribute your stuff to QuantLib along with a unit-test and they will be maintained for free by the QuantLib team ;-) |
In reply to this post by Ferdinando M. Ametrano-3
Hi,
I just got the CVS and compiled under VC7. The new ExchangeRate class doesn't compile. I think due to the line std:list<ExchangeRate> rateChain_ in the class definition. The error says that QuantLib::ExchangeRate is an undefined class. Has anyone else compiled this under VC7 .NET? Thanks, Neil --------------------------------------------------- Neil Firth Brasenose College Oxford OX1 4AJ United Kingdom Office: 01865 280616 [hidden email] http://www.maths.ox.ac.uk/~firth --------------------------------------------------- |
Hi Neil
>I just got the CVS and compiled under VC7. The new ExchangeRate class >doesn't compile. VC7, VC6, and Borland are not updated on the trunk. I fill fix them early tomorrow morning. ciao -- Nando |
On 2004.08.16 18:15, Ferdinando Ametrano wrote:
>> I just got the CVS and compiled under VC7. The new ExchangeRate >> class doesn't compile. > > VC7, VC6, and Borland are not updated on the trunk. I fill fix them > early tomorrow morning. The error was independent of that. I'm fixing it as I write. Well, not exactly as I write, you know. I've just one keyboard. You got the idea :) Later, Luigi |
In reply to this post by Penschke, Walter
Hi Nando,
I am not sure. May be I am doing something very stupid: I went for version 0.3.7 as you told me. After adapting my code base there were no problems when compiling the whole lot under Linux. With NT, I tried the tar.gz and the installer exe. In both cases, the attempt to compile quantlib classes with VC++ (via the workspace files) leads to the following error messages: --------------------Configuration: QuantLibFunctions - Win32 Debug SingleThread-------------------- Compiling... calendars.cpp d:\projects\quantlib\ql\qldefines.hpp(26) : fatal error C1083: Cannot open include file: 'boost/version.hpp': No such file or directory daycounters.cpp d:\projects\quantlib\ql\qldefines.hpp(26) : fatal error C1083: Cannot open include file: 'boost/version.hpp': No such file or directory mathf.cpp d:\projects\quantlib\ql\qldefines.hpp(26) : fatal error C1083: Cannot open include file: 'boost/version.hpp': No such file or directory vols.cpp d:\projects\quantlib\ql\qldefines.hpp(26) : fatal error C1083: Cannot open include file: 'boost/version.hpp': No such file or directory Error executing cl.exe. QuantLib-vc6-sgd-0_3_7.lib - 4 error(s), 0 warning(s) Obviously it can't find the boost library. Under Linux no complaint about boost. Does the boost library have to be installed separtely for NT? Help Appreciated, wpe -----Original Message----- From: Ferdinando Ametrano [mailto:[hidden email]] Sent: Monday, August 16, 2004 5:27 PM To: Penschke, Walter; '[hidden email]' Subject: RE: [Quantlib-users] Problem using QL 0.3.4 under MS-VC++ 6.0 Hi Walter, >I can only spend a fraction of my time to my Quantlib project. I >therefore started already a couple of month ago using version 0.3.4. My code >base did not compile out-of-the-box with the latest release. So I decided to >stay with 0.3.4. > >Would you recommend to go for the latest release? as far as QuantLib itself is concerned I would suggest 0.3.7, especially because 0.3.4 is quite old. Should you move to 0.3.7 take the extra step to define QL_DISABLE_DEPRECATED in order to disable all deprecated features that will be removed in the next release. Of course the last answer depends on the details of your QuantLib project... ciao -- Nando PS contribute your stuff to QuantLib along with a unit-test and they will be maintained for free by the QuantLib team ;-) |
Hi Walter
>I went for version 0.3.7 as you told me. After adapting my code base there >were no problems when compiling the whole lot under Linux. > >With NT [...] it can't find the boost library. Under Linux no complaint about >boost. Does the boost library have to be installed separtely for NT? yes, under Windows Boost has to be installed separately. QuantLib and QuantLibFunctions need Boost header files, while the test suite requires Boost unit-test libraries, so you have to build Boost libraries. Under Linux Boost is to be installed separately too: my guess is that you just didn't notice because of the automatic dependencies handling of your Linux distribution. ciao -- Nando |
In reply to this post by Penschke, Walter
Shure, you are right. I now discovered this as well.
wpe -----Original Message----- From: Ferdinando Ametrano [mailto:[hidden email]] Sent: Wednesday, August 18, 2004 6:24 PM To: Penschke, Walter Cc: '[hidden email]' Subject: RE: [Quantlib-users] Problem using QL 0.3.4 under MS-VC++ 6.0 Hi Walter >I went for version 0.3.7 as you told me. After adapting my code base there >were no problems when compiling the whole lot under Linux. > >With NT [...] it can't find the boost library. Under Linux no complaint about >boost. Does the boost library have to be installed separtely for NT? yes, under Windows Boost has to be installed separately. QuantLib and QuantLibFunctions need Boost header files, while the test suite requires Boost unit-test libraries, so you have to build Boost libraries. Under Linux Boost is to be installed separately too: my guess is that you just didn't notice because of the automatic dependencies handling of your Linux distribution. ciao -- Nando |
In reply to this post by Penschke, Walter
Ok,
got ql-037 finally working and compiling with boost. Now I want to use the quantlib library in my own project. I did check the RTTI-Option, I did define NOMINMAX and I am sure there is no problem with includes or libraries. Compiling my project now leads to the following error messages, which I did shorten: --- BEGIN --- --------------------Configuration: mv_pricing_test - Win32 Debug-------------------- Compiling... FloatSwapLeg.C c:\program files\microsoft visual studio\vc98\include\eh.h(32) : fatal error C1189: #error : "eh.h is only for C++!" FloatSwapLegPricingEngine.C c:\program files\microsoft visual studio\vc98\include\iosfwd(24) : error C2143: syntax error : missing '{' before '<' c:\program files\microsoft visual studio\vc98\include\iosfwd(24) : error C2059: syntax error : '<' c:\program files\microsoft visual studio\vc98\include\iosfwd(71) : error C2143: syntax error : missing '{' before '<' c:\program files\microsoft visual studio\vc98\include\iosfwd(71) : error C2059: syntax error : '<' c:\program files\microsoft visual studio\vc98\include\iosfwd(73) : error C2143: syntax error : missing '{' before '<' c:\program files\microsoft visual studio\vc98\include\iosfwd(73) : error C2059: syntax error : '<' c:\program files\microsoft visual studio\vc98\include\iosfwd(74) : error C2061: syntax error : identifier 'wstreampos' --- END --- This looks pretty similar to the problems I had, when using ql-034. I have no idea what's going on here. May be some kind of a fundamental setup problem? Any help desperately appreciated, wpe -----Original Message----- From: Ferdinando Ametrano [mailto:[hidden email]] Sent: Wednesday, August 18, 2004 6:24 PM To: Penschke, Walter Cc: '[hidden email]' Subject: RE: [Quantlib-users] Problem using QL 0.3.4 under MS-VC++ 6.0 Hi Walter >I went for version 0.3.7 as you told me. After adapting my code base there >were no problems when compiling the whole lot under Linux. > >With NT [...] it can't find the boost library. Under Linux no complaint about >boost. Does the boost library have to be installed separtely for NT? yes, under Windows Boost has to be installed separately. QuantLib and QuantLibFunctions need Boost header files, while the test suite requires Boost unit-test libraries, so you have to build Boost libraries. Under Linux Boost is to be installed separately too: my guess is that you just didn't notice because of the automatic dependencies handling of your Linux distribution. ciao -- Nando |
In reply to this post by Penschke, Walter
Hi,
I found the reason for my compilation problems. Actually a real stupid error. My C++ source files to be transferred from Linux to Windows, did have the extensions .H and .C. On Windoze there is no distinction between lower and upper case. Therefore my C++ were internally treated as C-files and not as C++-files, which obviously is reflected in a couple of internal settins during compilation (__cplusplus). Renaming my source files according to quantlib's coding convention (.cpp) did solve the problem. Sorry for pestering anybody, wpe -----Original Message----- From: Penschke, Walter Sent: Thursday, August 19, 2004 1:04 PM To: 'Ferdinando Ametrano'; Penschke, Walter Cc: '[hidden email]' Subject: RE: [Quantlib-users] Problem using QL 0.3.4 under MS-VC++ 6.0 Ok, got ql-037 finally working and compiling with boost. Now I want to use the quantlib library in my own project. I did check the RTTI-Option, I did define NOMINMAX and I am sure there is no problem with includes or libraries. Compiling my project now leads to the following error messages, which I did shorten: --- BEGIN --- --------------------Configuration: mv_pricing_test - Win32 Debug-------------------- Compiling... FloatSwapLeg.C c:\program files\microsoft visual studio\vc98\include\eh.h(32) : fatal error C1189: #error : "eh.h is only for C++!" FloatSwapLegPricingEngine.C c:\program files\microsoft visual studio\vc98\include\iosfwd(24) : error C2143: syntax error : missing '{' before '<' c:\program files\microsoft visual studio\vc98\include\iosfwd(24) : error C2059: syntax error : '<' c:\program files\microsoft visual studio\vc98\include\iosfwd(71) : error C2143: syntax error : missing '{' before '<' c:\program files\microsoft visual studio\vc98\include\iosfwd(71) : error C2059: syntax error : '<' c:\program files\microsoft visual studio\vc98\include\iosfwd(73) : error C2143: syntax error : missing '{' before '<' c:\program files\microsoft visual studio\vc98\include\iosfwd(73) : error C2059: syntax error : '<' c:\program files\microsoft visual studio\vc98\include\iosfwd(74) : error C2061: syntax error : identifier 'wstreampos' --- END --- This looks pretty similar to the problems I had, when using ql-034. I have no idea what's going on here. May be some kind of a fundamental setup problem? Any help desperately appreciated, wpe -----Original Message----- From: Ferdinando Ametrano [mailto:[hidden email]] Sent: Wednesday, August 18, 2004 6:24 PM To: Penschke, Walter Cc: '[hidden email]' Subject: RE: [Quantlib-users] Problem using QL 0.3.4 under MS-VC++ 6.0 Hi Walter >I went for version 0.3.7 as you told me. After adapting my code base there >were no problems when compiling the whole lot under Linux. > >With NT [...] it can't find the boost library. Under Linux no complaint about >boost. Does the boost library have to be installed separtely for NT? yes, under Windows Boost has to be installed separately. QuantLib and QuantLibFunctions need Boost header files, while the test suite requires Boost unit-test libraries, so you have to build Boost libraries. Under Linux Boost is to be installed separately too: my guess is that you just didn't notice because of the automatic dependencies handling of your Linux distribution. ciao -- Nando |
In reply to this post by Penschke, Walter
I use .hpp for the headers, .cpp for code file. One problem less. No point challenging the compiler, it always wins :-)
cheers Daniel J. Duffy > -----Original Message----- > From: [hidden email] > [mailto:[hidden email]]On Behalf Of > Penschke, Walter > Sent: 19 August 2004 14:53 > To: Penschke, Walter; 'Ferdinando Ametrano' > Cc: '[hidden email]' > Subject: RE: [Quantlib-users] Problem using QL 0.3.4 under MS-VC++ 6.0 > > > Hi, > > I found the reason for my compilation problems. Actually a real stupid > error. > > My C++ source files to be transferred from Linux to Windows, > did have the > extensions .H and .C. On Windoze there is no distinction > between lower and > upper case. Therefore my C++ were internally treated as > C-files and not as > C++-files, which obviously is reflected in a couple of > internal settins > during compilation (__cplusplus). > > Renaming my source files according to quantlib's coding > convention (.cpp) > did solve the problem. > > > Sorry for pestering anybody, > > wpe > > -----Original Message----- > From: Penschke, Walter > Sent: Thursday, August 19, 2004 1:04 PM > To: 'Ferdinando Ametrano'; Penschke, Walter > Cc: '[hidden email]' > Subject: RE: [Quantlib-users] Problem using QL 0.3.4 under MS-VC++ 6.0 > > > Ok, > > got ql-037 finally working and compiling with boost. > > Now I want to use the quantlib library in my own project. I > did check the > RTTI-Option, I did define NOMINMAX and I am sure there is no > problem with > includes or libraries. > > Compiling my project now leads to the following error > messages, which I did > shorten: > > --- BEGIN --- > --------------------Configuration: mv_pricing_test - Win32 > Debug-------------------- > Compiling... > FloatSwapLeg.C > c:\program files\microsoft visual > studio\vc98\include\eh.h(32) : fatal error > C1189: #error : "eh.h is only for C++!" > FloatSwapLegPricingEngine.C > c:\program files\microsoft visual > studio\vc98\include\iosfwd(24) : error > C2143: syntax error : missing '{' before '<' > c:\program files\microsoft visual > studio\vc98\include\iosfwd(24) : error > C2059: syntax error : '<' > c:\program files\microsoft visual > studio\vc98\include\iosfwd(71) : error > C2143: syntax error : missing '{' before '<' > c:\program files\microsoft visual > studio\vc98\include\iosfwd(71) : error > C2059: syntax error : '<' > c:\program files\microsoft visual > studio\vc98\include\iosfwd(73) : error > C2143: syntax error : missing '{' before '<' > c:\program files\microsoft visual > studio\vc98\include\iosfwd(73) : error > C2059: syntax error : '<' > c:\program files\microsoft visual > studio\vc98\include\iosfwd(74) : error > C2061: syntax error : identifier 'wstreampos' > --- END --- > > This looks pretty similar to the problems I had, when using > ql-034. I have > no idea what's going on here. May be some kind of a fundamental setup > problem? > > Any help desperately appreciated, > > > wpe > > > -----Original Message----- > From: Ferdinando Ametrano [mailto:[hidden email]] > Sent: Wednesday, August 18, 2004 6:24 PM > To: Penschke, Walter > Cc: '[hidden email]' > Subject: RE: [Quantlib-users] Problem using QL 0.3.4 under MS-VC++ 6.0 > > > Hi Walter > > > >I went for version 0.3.7 as you told me. After adapting my > code base there > >were no problems when compiling the whole lot under Linux. > > > >With NT [...] it can't find the boost library. Under Linux > no complaint > about > >boost. Does the boost library have to be installed separtely for NT? > > yes, under Windows Boost has to be installed separately. QuantLib and > QuantLibFunctions need Boost header files, while the test > suite requires > Boost unit-test libraries, so you have to build Boost libraries. > > Under Linux Boost is to be installed separately too: my guess > is that you > just didn't notice because of the automatic dependencies > handling of your > Linux distribution. > > ciao -- Nando > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Quantlib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |
Free forum by Nabble | Edit this page |