为什么linux下C11没法使用memcpy_s
gcc4.8,编译选项也使用了-std=c11,源文件中该include的文件也都加了,但最后还是报“undefinedreferenceto`memcpy_s'”#de...
gcc4.8,编译选项也使用了-std=c11,源文件中该include的文件也都加了,但最后还是报“undefined reference to `memcpy_s'”
#define __STDC_WANT_LIB_EXT1__ 1
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
#include <stdlib.h> 展开
#define __STDC_WANT_LIB_EXT1__ 1
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
#include <stdlib.h> 展开
2个回答
展开全部
简单的说,那就是没有呗;memcpy_s这个本身就是windows的库,而不是标准库,更不是你所说的C11的库;这个应该是windows所谓的更安全的库;
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
我正纠结这个问题,按GCC的manual文档,应该是完全支持ISO/IEC 9899:2011(C11) Annex K的。 附录K节,就是包含了这些安全函数的。
GCC manual:
c11
c1x
iso9899:2011
ISO C11, the 2011 revision of the ISO C standard. This standard is substantially completely supported, modulo bugs, floating-point issues (mainly but not entirely relating to optional C11 features from Annexes F and G) and the optional Annexes K (Bounds-checking interfaces) and L (Analyzability). The name c1x is deprecated.
GCC manual:
c11
c1x
iso9899:2011
ISO C11, the 2011 revision of the ISO C standard. This standard is substantially completely supported, modulo bugs, floating-point issues (mainly but not entirely relating to optional C11 features from Annexes F and G) and the optional Annexes K (Bounds-checking interfaces) and L (Analyzability). The name c1x is deprecated.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询