A package is the most robust way to build code for OpenWrt. Even if you're able to cross-compile outside of the build system, you may end up with an incompatible libc, or other libraries. (You'll find, like in many embedded projects, that even if the call is present, it may not work as expected, such as printf())