C:Math.h有不同的异常说明符

时间:2015-01-26 10:38:04

标签: c++ c math.h

我正在尝试使用此库中的一些函数编译自己的代码:tsnnls

这个库还使用其他库:Lapack,Blas,Argtable2,TAUCS

似乎math.h和taucs.h之间的函数错误处理存在一些不兼容性。请帮我解决这些错误。

以下是错误消息:

$ sudo make

g++ -c tsnnls_test_DKU.c
In file included from /usr/include/math.h:69:0,
                 from tsnnls_test_DKU.c:96:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:201:74: error: declaration of ‘int isinf(double) throw ()’ has a different exception specifier
 __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
                                                                          ^
In file included from tsnnls.h:31:0,
                 from tsnnls_test_DKU.c:57:
taucs_basic/taucs.h:814:12: error: from previous declaration ‘int isinf(double)’
 extern int isinf(double);
            ^
In file included from /usr/include/math.h:69:0,
                 from tsnnls_test_DKU.c:96:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:204:75: error: declaration of ‘int finite(double) throw ()’ has a different exception specifier
 __MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__));
                                                                           ^
In file included from tsnnls.h:31:0,
                 from tsnnls_test_DKU.c:57:
taucs_basic/taucs.h:811:12: error: from previous declaration ‘int finite(double)’
 extern int finite(double);
            ^
In file included from /usr/include/math.h:69:0,
                 from tsnnls_test_DKU.c:96:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:234:74: error: declaration of ‘int isnan(double) throw ()’ has a different exception specifier
 __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
                                                                          ^
In file included from tsnnls.h:31:0,
                 from tsnnls_test_DKU.c:57:
taucs_basic/taucs.h:808:12: error: from previous declaration ‘int isnan(double)’
 extern int isnan(double);
            ^
tsnnls_test_DKU.c: In function ‘int main(int, char**)’:
tsnnls_test_DKU.c:442:46: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   colvector_write_mat(outfile,xvals,Acols,"x");
                                              ^
make: *** [tsnnls_test_DKU.o] Error 1

0 个答案:

没有答案