Sunday, October 11, 2009

iPhone dev Stupidity 66: link to a static lib - conditionally

I'm trying to add the lua static lib into iphone app. The simulator config will build a .a for x86 and the device config will produce a .a for ARM.

To link both, we need to change the build: Check apple's doc: Linking framework conditionally for iPhone apps

In the target's get info -> build:

We search in different dirs for the lib to link.

And add the link flag:

* Make sure conform to the gcc convention: use -llua_iphone to link to the liblua_iphone.a lib file. Do NOT add the .a extension

No comments: