Quantcast
Channel: 睿论坛 - 最新话题
Viewing all articles
Browse latest Browse all 5702

Hikari编译项目时报redefinition of 'strstr'

$
0
0

@qokelate wrote:

需求:
解决错误~~

**日志:

❌  /Library/Developer/Toolchains/■■■■■■.xctoolchain/usr/include/c++/v1/string.h:104:13: redefinition of 'strstr'

const char* strstr(const char* __s1, const char* __s2) {return __libcpp_strstr(__s1, __s2);}
      ^

❌  /Library/Developer/Toolchains/■■■■■■.xctoolchain/usr/include/c++/v1/string.h:106:13: redefinition of 'strstr'

      char* strstr(      char* __s1, const char* __s2) {return __libcpp_strstr(__s1, __s2);}

**代码:
OC和C++混编, 文件类型为.mm,调用C++的stdio

操作步骤:
使用xcodebuild -toolchain com.naville.■■■■■■ -workspace xxx.xcworkspace -scheme xxx编译

** 环境:
macos/10.13.4 (17E199)
xcode/9.4.1

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5702

Trending Articles