Xcode 12.2 errors when IOS simulator with Cocos2d-x 4.0

For further info. I was able to get it running on device by. Deleting the offending files from the “other linker flags”

And then adding them into the build phases, Link binary with libraries.

Can’t get it to run in the simulator yet. Or indeed have any idea how to add this to CMake

1 Like

Does this not work if you add it to the APPLE section in your CMakeLists.txt?

find_library(libiconv NAMES libiconv)
find_library(libz NAMES libz)

I’m not sure if you need to pass specific paths to the find_library, but if you do then it should be just a matter of finding out where those libraries are usually placed.

EDIT: Looks like this has been reported here, with suggestions on how to get it working as well.

1 Like

Thanks. Yes that does the trick for Device builds, simulator still doesn’t work (minor issue though). I had added the find library but had missed the adding the result to the library list.