2011年6月8日 星期三

GSL problem: Run-Time Check Failure #0

If you call some gsl functions, the app pops up an error message.
"Run-Time Check Failure #0 - The value of ESP was not properly saved across a 
function call.  This is usually a result of calling a function declared with 
one calling convention with a function pointer declared with a different calling 
convention. "
 
There are some ways to solve the problem.   
  • You can set the [C/C++->Code Generation->Basic Runtime Checks] to default 
    which ensure the error about ESP won't happen. 
  •  Another method: ??

 
Test code:
#include <gsl/gsl_vector.h>
#include <stdio.h>

int main( void)
{
 double array[3] = { 1, 2, 3};
 gsl_vector_view view = gsl_vector_view_array( array, 3);
 return 0;
} 

沒有留言:

張貼留言