简体   繁体   English

编译和共享静态iPhone库-问题

[英]Compiling & sharing static iPhone library — issue

I am facing a strange issue while compiling my own static library. 在编译自己的静态库时遇到一个奇怪的问题。 My library is referring to some other libs and hence in my Target build settings I have give "Library Search Path" to these libs. 我的库引用了其他库,因此在“目标”构建设置中,我为这些库提供了“库搜索路径”。 Now, when I compile and share this static lib & other libs which my static lib needs with other project it fails on compilation as it tend to search for these libs in the path I specified when building the static lib. 现在,当我编译并共享此静态库和其他项目需要的静态库时,它在编译时失败,因为它倾向于在构建静态库时在指定的路径中搜索这些库。

If I remove the "Library Search Path" contents while compiling my static lib, it fails at compilation time. 如果在编译我的静态库时删除“库搜索路径”内容,则在编译时将失败。 I am totally stuck here. 我完全被困在这里。

ALong with setting up Header Search Path , Try setting up the Other Linkers Flag too.. 与设置标题搜索路径一起 ,也尝试设置其他链接器标记

Go to “Other Linker Flags” under the “Linker” section, and add “-ObjC” and “-all_load” to the list of flags 转到“链接器”部分下的“其他链接器标志”,并将“ -ObjC”和“ -all_load”添加到标志列表中

Hope that works for you, 希望对您有用,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM