【发布时间】:2011-05-18 02:49:02
【问题描述】:
我继承了一个依赖于静态库的项目(我很幸运!)。尝试构建静态库,我收到此错误:
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC
后面是这两行,我确实理解,但这似乎是一个单独的问题(缺少文件。)
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool: can't locate file for: -lFlurryWithLocation
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool: file: -lFlurryWithLocation is not an object file (not allowed in a library)
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool failed with exit code 1
我错了吗,这都是相关的吗?如果我修复丢失的文件部分,第一行错误会消失吗?
无论哪种方式,消息中的-dynamic not specified 部分是什么意思?
谢谢!
【问题讨论】:
-
你能告诉我们你传递给 libtool 的参数吗?
-
在 iPhone 开发中,许多第 3 方库要求您添加链接器标志 -ObjC 作为项目构建设置。 (段落)我在这个项目上摆弄了一段时间,神奇地,错误消失了。我真的不能说我做了什么,对不起。不过,我很想从了解 libtool 内部 gerwerkkens 的人那里知道
-dynamic not specified位的含义!
标签: iphone linker static-libraries