I have no idea why the compiler complained about requiring zlib and libm earlier this morning when I tried it. Now even after deleting everything and starting again, it all works fine. Just take care of those four functions like you have, and use lower-case on libpng.so and all is good.