Including external C library with Xcode

安稳与你 提交于 2019-12-06 15:14:42

Click your project in the navigator, select the appropriate target, and unfold the Linked Frameworks and Libraries section. Click the plus, click Add Other..., and browse to your static object.

You'll have to remove the -lantlr3c flag too.

You can use that in the other linker flags, but you also need to make sure the path is in the library search paths too.

Also make sure you're building with the right config (debug / release / whatever) — you can specify different libraries to link for each one, so if you've set it for debug but you're building release it obviously won't link.

When you test this lib with gcc on your Mac you are using the x86 version of it. The iOS linker does not find it because you probably did not build the arm version of the library.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!