Undefined symbols for architecture armv7: “_OBJC_CLASS_$_SSZipArchive”

烂漫一生 提交于 2019-12-12 05:40:23

问题


I am try using Extractzipfile plugin at this: https://github.com/phonegap/phonegap-plugins/tree/master/iOS/ExtractZipFile

But when i compiler with Xcode 4.6.1 in sdk 6.1 so it throws an error:

 Undefined symbols for architecture i386:
    "_OBJC_CLASS_$_SSZipArchive", referenced from:
        objc-class-ref in ExtractZipFilePlugin.o
  ld: symbol(s) not found for architecture i386
  clang: error: linker command failed with exit code 1 (use -v to see invocation)

I try to do the issue at here: Undefined symbols for architecture armv7 SSZipArchive

But it shows another error:

/Users/alienware/Desktop/ExtractZipFile/SSZipArchive/Tests/SSZipArchiveTests.m:10:9: 'SenTestingKit/SenTestingKit.h' file not found

I work with phonegap and I make app in iOS, i am dump.

Update: I try to add SSZipArchive.m into compiler source and this come to new Error:

Undefined symbols for architecture i386:
"_unzClose", referenced from:
    +[SSZipArchive unzipFileAtPath:toDestination:overwrite:password:error:delegate:] in SSZipArchive.o
"_unzCloseCurrentFile", referenced from:
    +[SSZipArchive unzipFileAtPath:toDestination:overwrite:password:error:delegate:] in SSZipArchive.o
"_unzGetCurrentFileInfo", referenced from:
    +[SSZipArchive unzipFileAtPath:toDestination:overwrite:password:error:delegate:] in SSZipArchive.o
"_unzGetGlobalInfo", referenced from:
    +[SSZipArchive unzipFileAtPath:toDestination:overwrite:password:error:delegate:] in SSZipArchive.o
"_unzGoToFirstFile", referenced from:
  +[SSZipArchive unzipFileAtPath:toDestination:overwrite:password:error:delegate:] in SSZipArchive.o
"_unzGoToNextFile", referenced from:
  +[SSZipArchive unzipFileAtPath:toDestination:overwrite:password:error:delegate:] in SSZipArchive.o
  "_unzOpen", referenced from:
    +[SSZipArchive unzipFileAtPath:toDestination:overwrite:password:error:delegate:] in SSZipArchive.o
"_unzOpenCurrentFile", referenced from:
  +[SSZipArchive unzipFileAtPath:toDestination:overwrite:password:error:delegate:] in SSZipArchive.o
"_unzOpenCurrentFilePassword", referenced from:
    +[SSZipArchive unzipFileAtPath:toDestination:overwrite:password:error:delegate:] in SSZipArchive.o
"_unzReadCurrentFile", referenced from:
    +[SSZipArchive unzipFileAtPath:toDestination:overwrite:password:error:delegate:] in SSZipArchive.o
"_zipClose", referenced from:
    -[SSZipArchive close] in SSZipArchive.o
"_zipCloseFileInZip", referenced from:
    -[SSZipArchive writeFile:] in SSZipArchive.o
    -[SSZipArchive writeData:filename:] in SSZipArchive.o
"_zipOpen", referenced from:
    -[SSZipArchive open] in SSZipArchive.o
"_zipOpenNewFileInZip", referenced from:
    -[SSZipArchive writeFile:] in SSZipArchive.o
    -[SSZipArchive writeData:filename:] in SSZipArchive.o
"_zipWriteInFileInZip", referenced from:
    -[SSZipArchive writeFile:] in SSZipArchive.o
    -[SSZipArchive writeData:filename:] in SSZipArchive.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

回答1:


Go to the Project Settings>go to the Build Phases tab and then Compile Sources and make sure you drag the class to the list.




回答2:


I had the same exact problem and here is what you have to do. In your project, create your own group (folder) called SSZipArchive and drag and drop the 2 main class files in it. Then inside SSZipArchive, create a sub-folder called minizip and now drag and drop the files in minizip into this folder. Basically, the folders in the source code need to be manually created...




回答3:


Hi as per my knowledge this error will occur due to anyone of the following reasons

1.If you forgot to import any library in VC classes. 2.Forgot to add required library in project. 3.Forgot to set the header search correctly (Means you added Extractzipfile plugin right so obviously you have to get the path for this library in project and have to set in header search path)

So please check these things. all the best.



来源:https://stackoverflow.com/questions/15897702/undefined-symbols-for-architecture-armv7-objc-class-ssziparchive

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!