1
votes

I build lua as a dynamic library target and another dynamic library target depend on it. When i require my lib,here's a error: multiple Lua VMs detected. I found a solution under gcc by adding -Wl,-E link flag here. But how to do in Xcode?

Update: I try to use -weak_library to link lua in my target also catch "multiple Lua VMs detected" error.

1
I've never included Lua in my own projects, but I'd bet your solution would be to change the library to be weak-linked to the app. - Michael Dautermann

1 Answers

1
votes

You should not link the second dynamic library with Lua. Leave it as a dependency. I'm not sure how to express this in Xcode. Also, as far as I know, there is no need to use -Wl,-E in Mac OS X.