strcat_s 在哪个图书馆?
In what library is strcat_s?
我尝试包含 string.h
和 stdlib.h
,但仍然出现未定义引用编译错误。
这让我得出结论,它在我没有包含的另一个库中。它在哪里?
我正在使用 gcc 编译器 - 代码是用 Windows 编写的,但将在 unix 服务器上编译和 运行。
strcat_s
可以在 string.h
as of C 2011 中找到。一般来说,只有微软实现了这些替代功能。
string.h
中出现
你也可以参考这个cppreference
Defined in header <string.h>
如果您在 UNIX 平台上工作,您可以更好地使用 strcat。
它似乎是 C11 标准的一部分:
http://en.cppreference.com/w/c/string/byte/strcat
老实说,我对标准不是很精通,我很可能是错的>.<
slibc 中有一个实现。
我尝试包含 string.h
和 stdlib.h
,但仍然出现未定义引用编译错误。
这让我得出结论,它在我没有包含的另一个库中。它在哪里?
我正在使用 gcc 编译器 - 代码是用 Windows 编写的,但将在 unix 服务器上编译和 运行。
strcat_s
可以在 string.h
as of C 2011 中找到。一般来说,只有微软实现了这些替代功能。
string.h
中出现
你也可以参考这个cppreference
Defined in header
<string.h>
如果您在 UNIX 平台上工作,您可以更好地使用 strcat。
它似乎是 C11 标准的一部分:
http://en.cppreference.com/w/c/string/byte/strcat
老实说,我对标准不是很精通,我很可能是错的>.<
slibc 中有一个实现。