Create Static Library iOS Error
Posted
by
bit-whacker
on Stack Overflow
See other posts from Stack Overflow
or by bit-whacker
Published on 2013-06-28T04:18:22Z
Indexed on
2013/06/28
4:21 UTC
Read the original article
Hit count: 158
This is FIrst time i try to create Cocoa Touch Static Library
and follow these steps.
- Create New Project with
Cocoa Touch Static Library
named it By default i got single class withDemo.h
andDemo.m
.
2.Create a public function in .h
and implement it in .m
.
3.Select iOS Device
and press cmd + B
.
4.Copy Demo.a
from products and the .h
file drop it in my iOS App
where i want to use it.
5.Then Import Demo.h
and try to call the function that i wrote.
Issue
When try to Run the project showing this error.
ld: warning: ignoring file /Users/Zenga/Documents/iOS/Static Library/myAppwithLib/Demo.a, file was built for archive which is not the architecture being linked (i386): /Users/Zenga/Documents/iOS/Static Library/myAppwithLib/Demo.a
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_Demo", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please help if anyone have any idea about it.
© Stack Overflow or respective owner