Compiling error in MS VC++ for kronrodintegral

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling error in MS VC++ for kronrodintegral

amar singh

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
Reply | Threaded
Open this post in threaded view
|

Re: Compiling error in MS VC++ for kronrodintegral

amar singh
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
Reply | Threaded
Open this post in threaded view
|

Re: Compiling error in MS VC++ for kronrodintegral

Luigi Ballabio-2
On 2003.12.23 07:10, amar singh wrote:

> 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!)

Amar,
        the error you had wasn't an error in your code--it was an  
internal compiler error, meaning that VC++ got confused by something  
and could not even tell you why. In short, you triggered a bug in the  
compiler. The compiler documentation is not much help either--it merely  
suggests to rewrite your (legal) code in a different way. In short,  
they don't know why the compiler goes bang and hope that rewriting the  
code will cause the compiler to do something different.

Sorry if I cannot be of much more help,
                Luigi