在编译和链接以下代码时,我遇到了“undefined reference to 'typeof'”错误:
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
int main() {
typeof(5);
return 0;
}
gcc版本为4.3.3,命令行是"gcc.exe -std=c99 1.c -o 1.exe"。
在编译和链接以下代码时,我遇到了“undefined reference to 'typeof'”错误:
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
int main() {
typeof(5);
return 0;
}
gcc版本为4.3.3,命令行是"gcc.exe -std=c99 1.c -o 1.exe"。
__typeof__
,它可以在任何标准兼容模式下工作。 - ephemient