OpenWrt Forum Archive

Topic: Resolving Dependencies of C code on wrt54g

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I was able to run a hello world program on my linksys wrt54g router running white Russian 0.9.

I am using sdk for white russian 0.9 for cross compiling my c code then creating package of my application(for eg helloworld) then installing that package on to router by ssh terminal.

So now if I am creating a package using the below mentioned header files in my c code, then after installation when i run the application like this on router:

root@openwrt#helloworld
ERROR: /bin/helloworld: line 1: syntax error: “)” unexpected

it gives an error.

i need to add following headers to my code
<pcap.h>
<sys/socket.h>
<string.h>
<stdlib.h>
<netinet/in.h>


so please tell me which packages i guess i must install first to make my code run
as i notice we have uclibc for <stdio.h>.
or incase something else i need to do to make it run.

Thank you

ERROR: /bin/helloworld: line 1: syntax error: “)” unexpected

Your binary was not cross compiled properly. Make sure your source directory is clean and does not contain precompiled objects.

The discussion might have continued from here.