Framework 开发的那些事

  1. static A 嵌套了static B

1.因为static B中使用了一些动态库(dylib) 但是staticA中无法添加dylib文件
报错:


error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: 
file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/lib/libz.tbd is not an object file (not allowed in a library)

2.如果不添加dylib就会
报错:


ld: framework not found PywSdk for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
但是staticB中用到了 系统.Framework 可以添加到staticA中
设想:如果staticB中没有用到dylib库应该是可以static嵌套static吧

2.dynamic A 嵌套 dynamic B/static B

1>.因为dynamic是系统保存一份的。所以dynamic A中不能使用和一样的文件和全局文件。报文件重复错误,所以dynamicA中文件和全局变量要避免和dynamic B/static B中得一样。要是一定要用一样的文件要修改文件加个前缀。
报错:
184 人浏览过

发表评论

邮箱地址不会被公开。 必填项已用*标注