I'm trying to run a file called vl_compile.m
for VLFeat and I am getting this error in regards to the mexutils.h
header file:
>> vl_compile
vl_compile: assuming that Visual C++ is the active compiler
vl_compile: compiling for PCWIN64 (64 bit)
MEX C:\Users\verastegui\Documents\panorama\lib\vlfeat-0.9.21\toolbox\aib\vl_aib.c
Building with 'MinGW64 Compiler (C)'.
Error using mex
In file included from C:\Users\verastegui\Documents\panorama\lib\vlfeat-0.9.21\toolbox\aib\vl_aib.c:16:0:
C:\Users\verastegui\Documents\panorama\lib\vlfeat-0.9.21\toolbox/mexutils.h:175:10: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'void'
EXTERN_C void __attribute__((noreturn))
^~~~
C:\Users\verastegui\Documents\panorama\lib\vlfeat-0.9.21\toolbox/mexutils.h: In function 'vlmxError':
C:\Users\verastegui\Documents\panorama\lib\vlfeat-0.9.21\toolbox/mexutils.h:277:1: warning: 'noreturn' function does return
}
^
Error in vl_compile (line 140)
mex(cmd{:}) ;
Here is the macro in mexutils.h
where the error actually occurs:
/* these attributes suppress undefined symbols warning with GCC */
#ifdef VL_COMPILER_GNUC
#if (! defined(HAVE_OCTAVE))
EXTERN_C void __attribute__((noreturn))
mexErrMsgIdAndTxt (const char * identifier, const char * err_msg, ...) ;
#else
extern void __attribute__((noreturn))
mexErrMsgIdAndTxt (const char *id, const char *s, ...);
#endif
#endif
And here is the function where the warning is raised:
vlmxError (VlmxErrorId errorId, char const * errorMessage, ...)
{
MEXUTILS_RAISE_HELPER ;
mexErrMsgIdAndTxt (formattedErrorId, formattedErrorMessage) ;
}
I've seen some fixes on StackOverflow that say to either comment out EXTERN_C void __attribute__((noreturn))
or to add a semicolon to it, but that just raises more errors. I am using the most recent version of VLFeat, and the most recent version of the MinGW compiler. I can provide more code if needed, but this is just the most recent VLFeat version. Any help would be appreciated.