0
votes

I am trying to interface MATLAB with ardrone by following the tutorial in http://home.wlu.edu/~levys/software/ardrone_autopylot/. After doing "make" the issue which I am having is with gcc compiler,but I am not sure about this.

output after doing make:

In file included from /usr/local/MATLAB/R2011b/extern/include/matrix.h:293, 
                 from /usr/local/MATLAB/R2011b/extern/include/engine.h:44, 
                 from matlab_agent.c:29:
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/include/stddef.h:149: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
In file included from /usr/local/MATLAB/R2011b/extern/include/matrix.h:294,
                 from /usr/local/MATLAB/R2011b/extern/include/engine.h:44,
                 from matlab_agent.c:29:
/usr/local/MATLAB/R2011b/extern/include/tmwtypes.h:798: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘mwSignedIndex’
matlab_agent.c: In function ‘agent_comm_act’:
matlab_agent.c:90: warning: initialization from incompatible pointer type
make: [matlab_agent.o] Error 1

These above lines looks like a GCC compiler error, anyone who has come across this kind of problem please share your experience.

1

1 Answers

1
votes

Without your source code, it's not possible to tell what's going on exactly; I do note that the typedef on line 149 is the first actual C code in the include file in question, which makes me think you have inadvertent garbage somewhere before its inclusion. See, for example, what happens with the following snippet:

int
#include <stddef.h>

(This does not produce the exact same error, at least on my system; I don't know what token(s) would do so.)