How to cross-compile a C program?

Hello everybody,
I know that there is a tutorial about OpenWrt and C language. https://openwrt.org/docs/guide-developer/helloworld/start. I followed this guide and created a package to execute on my OpenWrt system. It worked. The problem is that I don't need to obtain a .ipk file. I simply need to obtain the executable file to transfer to OpenWrt, without any package. Is this possibile? Is there a tutorial about that? What's the easiest way to cross-compile my C program?
I'm working on a RaspberryPi model 3 B+, with architecture bcm27xx-bcm710.

Without any details, maybe extract the binary from the .ipk and copy it to the fs?

1 Like