屌丝求助--静态库里引入静态库

prepostrous 发布于 2014年03月04日
无人欣赏。

我在做一个静态库,工程里引入了其他的静态库,我的路径也都对,但是报错: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -xxxxxxxSDK is not an object file (not allowed in a library). 怎么破呢?各位大大指点一下啊~

共10条回复
prepostrous 回复于 2014年03月04日

我就不信大牛都休息那么早....

prepostrous 回复于 2014年03月04日

我去,都去开导大三妹子去了,我还是不信没睡的都是在灌水。。。自己顶。

tinyfool 回复于 2014年03月05日

召唤 @sycx 大师

xamppobjc 回复于 2014年03月05日

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool

这个路径是系统的路径,你确定是这个引发的错误?

prepostrous 回复于 2014年03月05日

4楼 @xamppobjc 我现在是做了个framework引入了当前工程。那个framework是用来做静态库的,里面包含了其他的静态库。The Error:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/usr/lib/libz.dylib is a dynamic library, not added to the static library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/usr/lib/libz.dylib is a dynamic library, not added to the static library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lBaiduMobAdSdk /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lBaiduMobAdSdk is not an object file (not allowed in a library) /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lMobiSageRecommend /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lMobiSageRecommend is not an object file (not allowed in a library) /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lMobiSageSDK /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lMobiSageSDK is not an object file (not allowed in a library) Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool failed with exit code 1

prepostrous 回复于 2014年03月05日

4楼 @xamppobjc 最后那行粗体是报红的。。。请帮忙看看。

prepostrous 回复于 2014年03月05日

Where is Our Coders ?

pinxue 回复于 2014年03月05日

libz.dylib is a dynamic library, not added to the static library 这个你是怎么整出来的 can't locate file for: -lBaiduMobAdSdk 是找不到 libBaidMobAdSdk.a 的意思

先检查库文件全不全,位置对不对。再检查arch对不对,你现在是在simulator上,需要有x86的库,直接在设备上试试。

xamppobjc 回复于 2014年03月06日

-lBaiduMobAdSdk 这个貌似是百度的什么静态库,你引入了这个库的么? 顺便你看看你引入的静态库路径对不对。

登录 或者 注册
相关帖子