从静态库 XCode 4 中删除源代码
如何使用 XCode 4 从静态库中删除源代码? 当我在目标中有 Xcode 3 时,会有源列表,我可以删除它们,但是使用 XCode 4 时,目标不可扩展...
我可以使用一些 libtool 来执行 olso 吗?
谢谢!
how can i remove the source code from my static library with XCode 4?
When i have Xcode 3 in target there is the list of source and i can delete them, but with XCode 4 the target is not expandable...
Can i do olso with some libtool?
Thansk!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不确定明白你的意思,但如果你想从二进制/库中删除符号,你应该使用
剥离
命令。静态库不是源代码,而是机器代码。
如果您只有静态库,则无法访问源文件。
否则,如果您的意思是“目标”而不是库,这意味着您实际上正在使用 Xcode 构建库,并且您希望特定源文件不编译到库中,请使用 Xcode 右侧面板上的“目标成员资格”部分(公用事业)。
选择文件时,您可以设置源文件的目标:
Not sure to understand what you mean, but if you want to remove symbols from a binary/library, you should use the
strip
command.A static library is not source code, it's machine code.
You can't have access to the source files, if you only have a static library.
Otherwise, if you meant "target" instead of library, meaning you are actually building a library with Xcode, and you want that specific source files don't compile into the library, use the "Target membership" section on the Xcode right panel (utilities).
When you select the file, you can set the target for the source file:
我假设您已将库源添加到项目中,并且希望将它们从特定目标中删除。选择项目(左侧的顶级项目),在“Targets”下选择目标,单击“Build Phases”并从“Compile Sources”中删除相应的项目。
I'm assuming that you have the library sources added to the project and you want to remove them from a specific target. Select the project (the top level item on the left side), select the target under "Targets", click "Build Phases" and remove the respective items from "Compile Sources".
在静态库目标的构建设置下,为“部署后处理”和“复制期间剥离调试符号”选择“否”。它是编译代码,因此不需要剥离符号。
Under build settings for the static library target, select NO for 'deployment postprocessing' and 'strip debug symbols during copy'. It is compiled code so it doesn't need symbols stripped.