2012-04-19 145 views
0

我试图按照http://home.wlu.edu/~levys/software/ardrone_autopylot/中的教程将MATLAB与ardrone接口。完成“make”后,我遇到的问题是使用gcc编译器,但我不确定这一点。这样做之后GCC编译器问题

输出:

 
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 

上述这些线看起来像一个GCC编译器错误,谁碰到过这样的问题,请分享你的经验。

回答

1

如果没有您的源代码,无法确切知道发生了什么;我注意到,149行中的typedef是包含文件中第一个真正的C代码,这使得我认为在包含它之前在某个地方有无意的垃圾。见,例如,如何处理下面的代码段发生:

int 
#include <stddef.h> 

(这不会产生完全相同的错误,至少在我的系统,我不知道是什么令牌(S)会这么做。)