开发者

MinGW error "undefined reference to 'typeof''"

开发者 https://www.devze.com 2022-12-26 03:46 出处:网络
I get an \"undefined reference to \'typeof\'\"-error compiling and linking this: #include <stdio.h>开发者_运维百科;

I get an "undefined reference to 'typeof'"-error compiling and linking this:

#include <stdio.h>开发者_运维百科;
#include <stdlib.h>
#include <stddef.h>

int main() {
    typeof(5);
    return 0;
}

Version of gcc is 4.3.3, command line is "gcc.exe -std=c99 1.c -o 1.exe".


By passing the option -std=c99 to GCC you've asked it to compile according to the C99 standard, which doesn't support the typeof keyword.

You may want to use -std=gnu99 instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消