When trying to compile the mex-files of the Octave packages NaN-toolbox and biosig, the error below is observed with the recent version of octave in Cygwin,
According to http://octave.1599824.n4.nabble.com/Problems-with-mkoctfile-using-GCC-4-8-1-td4657964.html http://hg.savannah.gnu.org/hgweb/octave/file/811019b9ef57/libinterp/corefcn/mex.h#l67 the attached patch fixes this for Octave 3.6.4. I suggest to apply this patch to Octave in Cygwin. Cheers, Alois schloegl@WT7 /cygdrive/l/src/octave-forge/extra/NaN/src $ mkoctfile --mex xptopen.cpp In file included from /usr/include/octave-3.6.4/octave/mexproto.h:52:0, from /usr/include/octave-3.6.4/octave/mex.h:77, from xptopen.cpp:64: /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib: In function ‘long long int std::abs(long long int)’: /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib:174:20: error: declaration of C function ‘long long int std::abs(long long int)’ conflicts with abs(long long __x) { return __builtin_llabs (__x); } ^ /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib:166:3: error: previous declaration ‘long int std::abs(long int)’ here abs(long __i) { return __builtin_labs(__i); } ^ /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib: In function ‘__int128 std::abs(__int128)’: /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib:179:19: error: declaration of C function ‘__int128 std::abs(__int128)’ conflicts with abs(__int128 __x) { return __x >= 0 ? __x : -__x; } ^ /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib:174:3: error: previous declaration ‘long long int std::abs(long long int)’ here abs(long long __x) { return __builtin_llabs (__x); } ^ /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib:179:19: error: declaration of C function ‘__int128 std::abs(__int128)’ conflicts with abs(__int128 __x) { return __x >= 0 ? __x : -__x; } ^ /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib:166:3: error: previous declaration ‘long int std::abs(long int)’ here abs(long __i) { return __builtin_labs(__i); } ^
--- /usr/include/octave-3.6.4/octave/mex.h.orig 2014-01-10 12:17:09.668140800 +0100 +++ /usr/include/octave-3.6.4/octave/mex.h 2014-01-10 12:18:07.926966100 +0100 @@ -64,6 +64,8 @@ #define mxMAXNAME 64 +#include "mexproto.h" + #if defined (__cplusplus) extern "C" { #endif @@ -74,8 +76,6 @@ void mexFunction (int nlhs, mxArray* plhs[], int nrhs, const mxArray *prhs[]); #endif -#include "mexproto.h" - /* V4 floating point routines renamed in V5. */ #define mexIsNaN mxIsNaN #define mexIsFinite mxIsFinite
-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple