I recently found myself in the position of wanting to cross-compile a simple program to run on a router running OpenWrt. Unfortunately, I found the existing documentation, especially the existing wiki entry, very frustrating to follow. After considerable time wading through multiple previous forum posts and going though a lengthy process of trial-and-error I finally got my code compiling. It occurred to me that someone else might be having similar difficulties, so I wrote a short tutorial on how to cross-compile code for OpenWrt. This tutorial can be found here: http://people.bu.edu/ebishop/openwrt-programming.html
I hope this benefits someone who is having similar difficulties to what I ran into.