Login  Register

Re: Compiling error in MS VC++ for kronrodintegral

Posted by amar singh on Dec 22, 2003; 10:11pm
URL: http://quantlib.414.s1.nabble.com/Compiling-error-in-MS-VC-for-kronrodintegral-tp2757p2758.html

I think the problem is due to the signature of the function I pass in the operator(). I had earlier used as following :
 
double Fn(double x)
{
return x^2;
}
 
double val = KronrodIntegral(0.1,1000)(Fn,0,5);
 
This gave the above compiling error in MS VC++, while it works in Borland C++.
 
Writing it as
double val = KronrodIntegral(0.1,1000)(std::ptr_fun<double,double>(Fn),0,5);
 
solves the compiling error problem in MS VC++.
 
Don't know how it works though! (copied the usage from test-suite!)
 
Thanks all for your help,
Amar


amar singh <[hidden email]> wrote:

Hi,

 

I get the following compiling error in MS VC++ when trying to use KrondonIntegral class ( though it works with Borland C++). Could someone please give a hint?

\quantlib\quantlib-0.3.4\ql\math\kronrodintegral.hpp(52) : fatal error C1001: INTERNAL COMPILER ERROR
        (compiler file 'msc1.cpp', line 1794)
         Please choose the Technical Support command on the Visual C++
         Help menu, or open the Technical Support help file for more information

 
 
Thanks for your help,
Amar


Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard


Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard