我正在尝试按照http://home.wlu.edu/~levys/software/ardrone_autopylot/中的教程将MATLAB与ardrone连接起来。做完" make"我遇到的问题是使用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编译器错误,任何遇到此类问题的人都请分享您的经验。
答案 0 :(得分:1)
如果没有源代码,就无法确切地知道发生了什么;我注意到第149行的typedef
是有问题的包含文件中的第一个实际C代码,这让我觉得你在包含它之前有无意识的垃圾。例如,请参阅以下代码段会发生什么:
int
#include <stddef.h>
(这不会产生完全相同的错误,至少在我的系统上;我不知道哪些令牌会这样做。)