Comments (10)
It would be great if you describe how to add the static library in detail...
I did the following:
I downloaded your attached project
I build it (with the build parameter release)
I started the Finder
I added the static library by Add Existing Framework -> Add Other -> choose the
libziparchive.a
I added the path to the header files in the target-properties "Header Search
Paths" (relative Path and recursive)
I cleaned the project
I build the project
My Code is the follwoing:
blabla.h:
#import "ZipArchive.h"
blabla.m
ZipArchive* za = [[ZipArchive alloc] init];
if( [za UnzipOpenFile:fromfile] )
{
BOOL ret = [za UnzipFileTo:todirectory overWrite:YES];
if( NO==ret )
{
}
[za UnzipCloseFile];
}
And the error that i get while building the project is:
ld: warning: in /Users/hannessatz/Documents/DownloadFile/libziparchive.a, file
was built for unsupported file format which is not the architecture being
linked (i386)
".objc_class_name_ZipArchive", referenced from:
literal-pointer@__OBJC@__cls_refs@ZipArchive in ABDownloadEPub.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Did you face such a problem already?
Original comment by [email protected]
on 11 Jun 2010 at 12:04
from elziparchive.
[deleted comment]
from elziparchive.
That project is set to build a static library for iPhoneOS. If you get info on
the project, you'll se that in the Build tab, the "Valid Architectures"
variable is set to be "armv6 armv7". You are probably using this static library
in a Mac OS X application, not an iPhoneOS one, that's why that error pops up.
Static libraries are the only way when developing for iPhone. You'll probably
want to take a look on how to generate a dynamic library if you are developing
an application for Mac OS X.
Take a look at
http://stackoverflow.com/questions/140061/when-to-use-dynamic-vs-static-librarie
s .
:: Edited to correct information on the build variable
Original comment by [email protected]
on 11 Jun 2010 at 12:28
from elziparchive.
Dear hazmat82,
i have spent days trying to add a static library [ziparchive_static] that you
have attached into other iphone project
and i have refereed to many tutorials "how to add static library into iphone
projects" but every attempt got me
the same 9 Errors wich are:
"_inflateInit2_", referenced from:
_unzOpenCurrentFile3 in libZIPLibraryKit.a(unzip.o)
"_deflate", referenced from:
_zipWriteInFileInZip in libZIPLibraryKit.a(zip.o)
_zipCloseFileInZipRaw in libZIPLibraryKit.a(zip.o)
"_inflateEnd", referenced from:
_unzCloseCurrentFile in libZIPLibraryKit.a(unzip.o)
"_deflateInit2_", referenced from:
_zipOpenNewFileInZip3 in libZIPLibraryKit.a(zip.o)
"_inflate", referenced from:
_unzReadCurrentFile in libZIPLibraryKit.a(unzip.o)
"_get_crc_table", referenced from:
_unzOpenCurrentFile3 in libZIPLibraryKit.a(unzip.o)
_zipOpenNewFileInZip3 in libZIPLibraryKit.a(zip.o)
"_deflateEnd", referenced from:
_zipCloseFileInZipRaw in libZIPLibraryKit.a(zip.o)
"_crc32", referenced from:
_unzReadCurrentFile in libZIPLibraryKit.a(unzip.o)
_unzReadCurrentFile in libZIPLibraryKit.a(unzip.o)
_zipWriteInFileInZip in libZIPLibraryKit.a(zip.o)
-[ZipArchive addFileToZip:newname:] in libZIPLibraryKit.a(ZipArchive.o)
-[ZipArchive addFileToZip:newname:] in libZIPLibraryKit.a(ZipArchive.o)
"___gxx_personality_v0", referenced from:
___gxx_personality_v0$non_lazy_ptr in libZIPLibraryKit.a(ZipArchive.o)
(maybe you meant: ___gxx_personality_v0$non_lazy_ptr)
// end of error log
More than appreciative for the guide even if you could not help me.
regards ,
Ahmad
Original comment by [email protected]
on 5 Oct 2010 at 1:48
from elziparchive.
the previous issue is solved, the problem was i had to include Framework
"libz.dylib"
Thanks for the effort
Original comment by [email protected]
on 7 Oct 2010 at 1:59
from elziparchive.
Good to know you solved the problem!
Original comment by [email protected]
on 7 Oct 2010 at 5:11
from elziparchive.
Dear hazmat82,
A random Question have you ever compiled static library from Terminal?
i am in a middle of project which need ZipArchive Library i have been trying to
compile the library for armv6/armv7 but didn't work for me.
any guides or tips will be so much appreciated.
Links:http://www.artpol-software.com/
Original comment by [email protected]
on 27 Oct 2010 at 1:40
from elziparchive.
Never tried to compile a static library from the terminal, as I use Xcode for
development. Sorry!
Original comment by [email protected]
on 27 Oct 2010 at 2:45
from elziparchive.
Dear hazmat82,
I am so grateful for the support, but i really help, i am looking for
compression library support AES encryption on iPhone project, please if you
have any idea where i can find such a library i am so appreciated.
Best Regards,
Ahmad kayyali
Original comment by [email protected]
on 1 Nov 2010 at 7:28
from elziparchive.
CommonCrypto library seems to support AES. Take a look at this:
http://stackoverflow.com/questions/1400246/aes-encryption-for-an-nsstring-on-the
-iphone
Best,
F.
Original comment by [email protected]
on 1 Nov 2010 at 10:33
from elziparchive.
Related Issues (20)
- Adding large filles problem HOT 2
- Unzip error HOT 1
- Use of deprecated NSString call in ZipArchive class
- minizip - zip.c Value stored to 'err' is never read, unzip.c Value stored to 'lSeek' is never read and Value stored to 'err' is never read
- unable to unzip zipped file when supplying password at zip creation HOT 2
- Unzip cannot handle unicode filenames HOT 1
- UnzipOpenFile always failed
- Assigning a ZipArchiveDelegate to grab the error messages does not work HOT 1
- Compile error:invalid deployment target for -stdlib=libc++ (requires iOS 5.0 or later) HOT 1
- Compile warning HOT 1
- ARC compliance, analyzer warnings, code semantics, etc. HOT 2
- @property (nonatomic, retain) id delegate??????? HOT 1
- ARC, compiler warnings, minor bug fixes, and documentation
- If folder is empty the folder is not added in the zip file
- If ZipArchive had some limit of the size of the package and the number of the package when unzipping?
- not able to unzip files zipped with pkzip on mac
- License terms?
- Zip a folder 2 Gb on Ipad crash the app (Problem Memory)
- Insufficient Entropy (CWE ID 331)
- Error Handling Issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elziparchive.