【前提】
我想从已经写成系统的代码中摘取部分代码到控制台
直接复制的部分代码:
gsl_matrix_view *M_sub=new gsl_matrix_view;
*M_sub=gsl_matrix_submatrix(L,0,0,K->size1,K->size2);
在上面第二句出现了中断现象并提示错误为:
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.
点击继续的话代码还可以运行且计算正确只是最终会显示:
Access violation
【解决】
翻遍了网上的相关文章该做的也做了
还是错误
【最终解决】
(1)回到原始代码点击项目--属性--c/c++(2)链接器等属性
不一样的就做相应修改。
成功