gpt4 book ai didi

ios - 无法编译 Ziparchive 库 (iOS)

转载 作者:行者123 更新时间:2023-11-28 22:19:45 25 4
gpt4 key购买 nike

我需要在我的 Xcode 项目中下载并解压一个文件,我正在使用 Ziparchive ( https://code.google.com/p/ziparchive/downloads/detail?name=ZipArchive.zip) 来这样做,而不是按照下面的每一步我得到编译错误:

/Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:68:18: Redefinition of 'fopen_file_func' as different kind of symbol
/Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:68:35: Use of undeclared identifier 'opaque'
/Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:68:58: Expected ';' after top level declarator
/Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:72:1: Expected unqualified-id
/Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:90:17: Redefinition of 'fread_file_func' as different kind of symbol
Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:90:42: Use of undeclared identifier 'stream'; did you mean 'strcat'?
Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:90:50: Use of undeclared identifier 'buf'
/Developer/AR/vuforia-sdk-ios-2-6-8/samples/ARDemo/minizip/ioapi.c:95:1: Expected unqualified-id

我不知道如何成功编译它,感谢任何帮助。

最佳答案

就我而言,这是因为我的前缀文件不正确。它包括在“#ifdef OBJC” block 之外的 objective-c 导入所以当所有类都是objecttive-C类时没有问题但是当我添加minizip的C类时它没有编译。

只需将前缀文件中的所有导入移动到 obj block 中,瞧!

#ifdef __OBJC__
#import <Availability.h>
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif

希望对你有帮助

关于ios - 无法编译 Ziparchive 库 (iOS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20741104/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com