如何在 mac os x 10.6 中向 gcc 添加头文件
我想为 iPhone 构建一个需要 openssl 的静态库。它无法从 openssl 找到包含文件。我应该如何告诉编译器在哪里寻找这些头文件?谢谢。
编辑:我正在尝试为iPhone构建librtmp,为arm而不是模拟器。只是为了测试一些东西。我不是从 xcode 构建它。我想我已经找到 INCLUDE_PATH ,我要去尝试一下是否有效。
I want to build a static library that requires openssl for iPhone. It can't find include files from openssl. How should I tell the compiler where to look for those header files? Thanks.
EDIT: I'm trying to build librtmp for iPhone, for arm not for simulator. Just to test something. Im not building it from xcode. I think i have found INCLUDE_PATH , I'm going to try if it works.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在项目属性中,在“搜索路径”下查找“标题搜索路径”
In your Project Properties, look for "Header Search Paths" under "Search Paths"
我包含了 INCLUDE_PATH 和 C_INCLUDE_PATH ,看起来它们有效。还有用于包含和库的编译器选项 -Idir 和 -Ldir。 http://gcc.gnu。 org/onlinedocs/gcc-4.5.0/gcc/Directory-Options.html#Directory-Options
I included both INCLUDE_PATH and C_INCLUDE_PATH and it seems they work. There is also the compiler option -Idir and -Ldir for includes and libraries. http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Directory-Options.html#Directory-Options