#import
@interface MyStaticLibraryDemo : NSObject
/// 加法
- (int)addMethodByFirst:(int)theFirst andSecond:(int)theSecond;
/// 减法
- (int)SubMethodByFirst:(int)theFirst andSecond:(int)theSecond;
@end
#import "MyStaticLibraryDemo.h"
@implementation MyStaticLibraryDemo
/// 加法
- (int)addMethodByFirst:(int)theFirst andSecond:(int)theSecond{
}
/// 减法
- (int)SubMethodByFirst:(int)theFirst andSecond:(int)theSecond{
}
@end
bogon:~ zhangzhen$ cd /Users/zhangzhen/Library/Developer/Xcode/DerivedData/MyStaticLibraryDemo-ciwnhcsbqgclkododazbmbmt
bogon:Release-iphoneos zhangzhen$ lipo -info libMyStaticLibraryDemo.a
Architectures in the fat file: libMyStaticLibraryDemo.a are: armv7 armv7s arm64
bogon:~ zhangzhen$ cd /Users/zhangzhen/Library/Developer/Xcode/DerivedData/MyStaticLibraryDemo-ciwnhcsbqgclkododazbmbmt
bogon:Release-iphonesimulator zhangzhen$ lipo -info libMyStaticLibraryDemo.a
Architectures in the fat file: libMyStaticLibraryDemo.a are: i386 x86_64
MyStaticLibraryDemo *myLibrary=[[MyStaticLibraryDemo alloc] init];
ld: warning: ignoring file /Users/XXXX/Documents/MyLibraryTest/MyLibraryTest/MyLibrary/libMyStaticLibraryDemo.a, missing required architecture i386 in file/Users/XXXX/Documents/MyLibraryTest/MyLibraryTest/MyLibrary/libMyStaticLibraryDemo.a (3 slices)
Undefined symbols for architecture i386:
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
bogon:~ zhangzhen$ lipo -create /所在路径/Release-iphoneos/libMyStaticLibraryDemo.a /所在路径/Release-iphonesimulator/libMyStaticLibraryDemo.a -output /Users/zhangzhen/Desktop/libUniversal.a
bogon:~ zhangzhen$