error C2143: syntax error : missing \';\' before \'type\'

 在进行windows下的mex时(用VC),会出现这种莫名的错误,原因:
Visual Studio only supports C89. That means that all of your variables must be declared before anything else at the top of a function.

有时在进行mex时,会出现莫名的错误,此时首先不要产生逻辑上的错误,很有可能是所用的编译器与写代码的人所用的编译器不同,出现兼容性问题,另一个,也有可能是标准不同,比如C99与C89、,C11都有很大的区别。

平时应该注意规范编码。
posted @ 2014-09-28 23:46  DeepVL  阅读(290)  评论(0编辑  收藏  举报