[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with mkoctfile using GCC 4.8.1
From: |
Terry Duell |
Subject: |
Problems with mkoctfile using GCC 4.8.1 |
Date: |
Mon, 07 Oct 2013 11:03:10 +1100 |
User-agent: |
Opera Mail/12.16 (Linux) |
Hello All,
Running Octave 3.6.4 on Fedora 19 x86_64.
Trying to build a mex file, as follows;
"mkoctfile --mex apply_blur_kernel_mex.cpp" gives the following (partial)
error message...
/usr/include/c++/4.8.1/cstdlib: In function ‘long long int std::abs(long
long int)’:
/usr/include/c++/4.8.1/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); }
A response posted to a similar error message (not related to Octave) was...
"That because header cstdlib is included in a 'extern "C"' block that gcc
4.8 doesn't support. Fix it by move the header file out of the 'extern "C"'
block."
A look at /usr/include/octave-3.6.4/octave/mexproto.h, shows...
#if defined (__cplusplus)
#include <cstdlib>
extern "C" {
#else
#include <stdlib.h>
#endif
I'm not sufficiently au fait with C and C++ to fully understand what is
going on here.
Does anyone know if this Is this the problem, and what is the recommended
way I fix this?
Cheers,
--
Regards,
Terry Duell
- Problems with mkoctfile using GCC 4.8.1,
Terry Duell <=