Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/111.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 函数的隐式声明'_strnicmp&x27;在C99中无效_Ios_C_Xcode - Fatal编程技术网

Ios 函数的隐式声明'_strnicmp&x27;在C99中无效

Ios 函数的隐式声明'_strnicmp&x27;在C99中无效,ios,c,xcode,Ios,C,Xcode,我是iOS新手 现在我来回答一个问题 #define strncasecmp _strnicmp 它有一个警告: implicit declaration of function '_strnicmp' is invalid in C99 还有一个错误: Undefined symbols for architecture armv7: "__strnicmp", referenced from: _AVI_open_input_file in avilib.o ld: symbol(s

我是iOS新手

现在我来回答一个问题

#define strncasecmp _strnicmp
它有一个警告:

implicit declaration of function '_strnicmp' is invalid in C99
还有一个错误:

Undefined symbols for architecture armv7:
"__strnicmp", referenced from:
  _AVI_open_input_file in avilib.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

如何解决这个问题?

很简单,您的C运行时没有函数
\u strnicmp
,这是一个标准的C函数


您应该删除
#define
并使用函数
strncasecmp
,因为
strncasecmp
是一个,并且iOS兼容POSIX。

很简单,您的C运行时没有函数
\u strnicmp
,它是一个标准的C函数

您应该删除
#define
并使用函数
strncasecmp
,因为
strncasecmp
是一个,并且iOS与POSIX兼容