小编ivo*_*iik的帖子

对“strnstr”的未定义引用如何修复它并运行 strnstr

我需要重现strnstr功能的行为。我想测试strnstr但无法编译程序,其编写的"implicit declaration of function strnstr [-Wimplicit-function-declaration]""undefined reference to strnstr". 我包括了 header <string.h>

我知道这strnstr()不在标准库中,问题可能与编译器有关,但是如何修复它以使用它strnstr()

编译器版本:gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

c gcc string.h

3
推荐指数
1
解决办法
2156
查看次数

标签 统计

c ×1

gcc ×1

string.h ×1