Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: unknown type name 'EXTERN_C' #230

Open
Huang-XN opened this issue Feb 7, 2023 · 1 comment
Open

error: unknown type name 'EXTERN_C' #230

Huang-XN opened this issue Feb 7, 2023 · 1 comment

Comments

@Huang-XN
Copy link

Huang-XN commented Feb 7, 2023

Hey,

I reproduced this error as it was in #201. But I could not solve it by commenting EXTERN_C void __attribute__((noreturn)).

When I commented it, it produced another error as follow:

In file included from /Users/xxx/Documents/MATLAB/vlfeat-0.9.21/./toolbox/vlad/vl_vlad.c:15:
toolbox/mexutils.h:176:1: warning: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
mexErrMsgIdAndTxt (const char * identifier, const char * err_msg, ...) ;
^
int
toolbox/mexutils.h:176:1: error: conflicting types for 'mexErrMsgIdAndTxt'
/Applications/MATLAB_R2021a.app/extern/include/mex.h:159:28: note: previous declaration is here
LIBMWMEX_API_EXTERN_C void mexErrMsgIdAndTxt(
                           ^
1 warning and 1 error generated.

make: *** [toolbox/mex/mexmaci64/vl_vlad.mexmaci64] Error 255

The command I used was make CC=/usr/local/opt/llvm/bin/clang DISABLE_OPENMP=no MEX=/Applications/MATLAB_R2021a.app/bin/mex ARCH=maci64

I am using MacOS BigSur 11.5.1 and MATLAB R2021a.

Can anyone solve it?

Thanks

Huang

@VishalP227
Copy link

I was getting the same error after commenting the line. It looks like EXTERN_C is a mistake, I changed it to just 'extern', what I mean is on line 175 of mexutils.h file I changed is from

EXTERN_C void attribute((noreturn))

to this :

extern void attribute((noreturn))

After doing this and running the make command again it was able to compile successfully.
I hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants