相关疑难解决方法(0)

为什么在设置-std = c99时gcc不能找到random()接口?

我做"#include <stdlib.h>"的是源头的顶部.

示例编译:

/usr/bin/colorgcc -std=c99 -fgnu89-inline  -g -Wall -I/usr/include -I./ -I../ -I../../ -I../../../ -I../../../../    -O3 -o f8  f8.c
In file included from f8.c:7:
ctype-cmp.c: In function ‘randomized’:
ctype-cmp.c:48: warning: implicit declaration of function ‘random’
ctype-cmp.c: In function ‘main’:
ctype-cmp.c:153: warning: implicit declaration of function ‘srandom’
ais@xcalibur:t$ 
Run Code Online (Sandbox Code Playgroud)

当我关闭-std = c99时,无法找到函数isfinite().所以我确实想要使用-std = c99这个和其他原因.有什么技巧我不见了?

c random gcc c99 c89

18
推荐指数
2
解决办法
1万
查看次数

标签 统计

c ×1

c89 ×1

c99 ×1

gcc ×1

random ×1