0

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)
Cœur
  • 37,241
  • 25
  • 195
  • 267
Lê Huy
  • 195
  • 1
  • 4
  • 13

3 Answers3

4

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.

BhushanVU
  • 3,455
  • 1
  • 24
  • 33
  • I can drag SSZipArchive.m because the folder is blue. But i try to add and this throw 16new error. His! i will update error. Please help me – Lê Huy Apr 09 '13 at 09:18
  • you just need to figure out whats your case amongst these solutions for "Undefined symbol"...heres Link http://stackoverflow.com/questions/6429494/undefined-symbols-for-architecture-armv7?rq=1 – BhushanVU Apr 09 '13 at 09:21
  • it shouldn't be a problem. – BhushanVU Apr 10 '13 at 05:12
1

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...

Jesse
  • 2,674
  • 6
  • 30
  • 47
0

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.

Naresh
  • 363
  • 1
  • 18
  • Thanks for answer! But this is first time i work with iOS! Can you tell me more clear to do this?? – Lê Huy Apr 09 '13 at 09:24
  • Thanks for answer! But this is first time i work with iOS!1=> i don't understand this(i am beginner);2=>I check a lot time this case;3=> I don't know how to do this right??? Please help me. – Lê Huy Apr 09 '13 at 09:36
  • Hi Huy ur using one third party library in your project right? – Naresh Apr 09 '13 at 09:37
  • First one is for example ur using any methods which are available in that plugin in any class like first.h.. In this first.h file you have to import that library like #import"ExtraZipFilePlugin.h". – Naresh Apr 09 '13 at 09:39
  • Yes! I use library for ios of phone gap, actually i make app in android is well. But this plugin in ios not work. in my plugin #import"ExtraZipFilePlugin.h" is import at ExtraZipFilePlugin.m – Lê Huy Apr 09 '13 at 09:40
  • Third one is once you start creating the project means you had save ur project at somewhere in your mac. So what ever file you added those are also available in that path where your project stored in mac. Now what you have to do is go to the folder where you stored your project and go through the ExtraZipFilePlugin and right click on that plugin file and select getinfo there you will get the path for this plugin. Now copy that path and paste at headersearchpath which are available in build settings of your project. – Naresh Apr 09 '13 at 09:44
  • Please go through the above things and get back to me if you need anything more. – Naresh Apr 09 '13 at 09:45
  • Thanks for your help! I am try all but same error. i try to add "/Users/alienware/Desktop/zipandfile/zipandfile/Plugins" and " /Users/alienware/Desktop/ExtractZipFile" in header search path. It's wrong?? – Lê Huy Apr 09 '13 at 10:09
  • Yes correct .. and try to add the same path in library search path aswell. After that close xcode and reopen. – Naresh Apr 09 '13 at 10:43
  • I try all but have same error. I use mac os in Vmware. it's ok?? – Lê Huy Apr 10 '13 at 02:40