Linux gcc 4.1.2 ‘strnset’‘wcsnset’compiler error 要如何修正?

suanyuan 2010-02-04 11:05:41
在 Linux 下,用 gcc 4.1.2 編譯,出現這些 error (gcc 3.xx 沒有錯誤),要如何修正這些錯誤?

../../../Lib/str/include/str.crt.h: In function ‘void str::set(char*, int, int)’:
../../../Lib/str/include/str.crt.h:36: error: ‘strnset’ was not declared in this scope
../../../Lib/str/include/str.crt.h: In function ‘void str::set(wchar_t*, int, int)’:
../../../Lib/str/include/str.crt.h:37: error: ‘wcsnset’ was not declared in this scope
../../../Lib/str/include/str.crt.h: In function ‘char* str::rev(char*)’:
../../../Lib/str/include/str.crt.h:80: error: ‘strrev’ was not declared in this scope
../../../Lib/str/include/str.crt.h: In function ‘wchar_t* str::rev(wchar_t*)’:
../../../Lib/str/include/str.crt.h:81: error: ‘wcsrev’ was not declared in this scope
../../../Lib/str/include/str.crt.h: In function ‘int str::icmp(const char*, const char*)’:
../../../Lib/str/include/str.crt.h:99: error: ‘stricmp’ was not declared in this scope
../../../Lib/str/include/str.crt.h: In function ‘int str::icmp(const wchar_t*, const wchar_t*)’:
../../../Lib/str/include/str.crt.h:100: error: ‘wcsicmp’ was not declared in this scope
../../../Lib/str/include/str.crt.h: In function ‘int str::icmp(const char*, const char*, int)’:
../../../Lib/str/include/str.crt.h:102: error: ‘strnicmp’ was not declared in this scope
../../../Lib/str/include/str.crt.h: In function ‘int str::icmp(const wchar_t*, const wchar_t*, int)’:
../../../Lib/str/include/str.crt.h:103: error: ‘wcsnicmp’ was not declared in this scope
../../../Lib/str/include/str.crt.h: In function ‘char* str::upr(char*)’:
../../../Lib/str/include/str.crt.h:153: error: ‘strupr’ was not declared in this scope
../../../Lib/str/include/str.crt.h: In function ‘wchar_t* str::upr(wchar_t*)’:
../../../Lib/str/include/str.crt.h:154: error: ‘wcsupr’ was not declared in this scope
../../../Lib/str/include/str.crt.h: In function ‘char* str::lwr(char*)’:
../../../Lib/str/include/str.crt.h:156: error: ‘strlwr’ was not declared in this scope
../../../Lib/str/include/str.crt.h: In function ‘wchar_t* str::lwr(wchar_t*)’:
../../../Lib/str/include/str.crt.h:157: error: ‘wcslwr’ was not declared in this scope
...全文
295 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
suanyuan 2010-02-04
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 tan870426 的回复:]
头文件包含有没有错呢?
[/Quote]

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <time.h>

#define vsnwprintf _vsnwprintf
//#define snprintf sprintf_s

#ifdef WIN32
#pragma message("> Nothing to do for VC")
#else
#include <wchar.h>
#endif
tan870426 2010-02-04
  • 打赏
  • 举报
回复
头文件包含有没有错呢?

64,632

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧