Arduino Yun doesn't link any library
It's not the compiler, it's the libpng package (and other libraries too).  It only contains the runtime shared library (.so) files.  You can't use it for development.

I haven't yet found if it's possible to directly install a full development package or not - normally development for OpenWRT is done outside the low-powered chip using a cross-compiler environment on a PC.