strcpy_s不能使用gcc [英] strcpy_s not working with gcc

查看:638
本文介绍了strcpy_s不能使用gcc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个C ++ 11项目,并且添加了一些 strcpy_s 方法调用。
这适用于windows,但在gcc上编译时,有一个错误
,指出没有找到 strcpy_s 符号。

I have a C++11 project, and I added some strcpy_s method calls. This works on windows, but when compiling on gcc, there is an error stating that strcpy_s symbol is not found.

我添加了行

#define __STDC_WANT_LIB_EXT1__ 1

到代码,无济于事。

推荐答案

GCC(或者说,glibc )不支持 strcpy_s()和朋友。有关在哪里可以找到支持它们的库的一些想法,请参阅:是否有strcpy_s和/或TR24731-1的免费实现?

GCC (or rather, glibc) does not support strcpy_s() and friends. For some ideas on where you can find a library which does support them, see here: Are there any free implementations of strcpy_s and/or TR24731-1?

这篇关于strcpy_s不能使用gcc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆