Bekijk de volledige versie : c compiler question olegs firmware

25-01-2009, 16:22

sorry for asking this implicitness but i want to know if there is a possibility to compile a c sourcefile like with gcc -o ... on olegs fimware.

I've checked ipkg list and installed for a kind of gcc pkg but i'am not sure enough with this stuff...

thanks in advance and kind regards,


25-01-2009, 17:52
for the on-router compilation install optware-devel package. It's a meta-package which includes the most of needed things.

25-01-2009, 20:47

I've installed the optware but i didn't find the correct compiler. Could you specify me the correct compiler pls ?

25-01-2009, 23:28
I don't think I understand your question. To compile typical program you have to execute:

make install
More details usually can be found in the documentation to the sources. All the stuff needed to perform this is installed by the optware-devel package. It is better if you clarify what do you mean under "correct compiler".

26-01-2009, 09:14
sorry, thats my mistake.

i want to compile the following like that:

----- newfile.c-----
#include <stdio.h>

void main()

printf("hello world!\n");

i want to get an executable file. I've done it with gcc on our SUN machines, but i haven't found something adequate on the wlhdd with olegs firmware.
I've looked at make but i think this wouldn't be ok for this.

But i believe there has to be something for this...

best regards

26-01-2009, 09:35
root@wl500g,~> gcc 1.c
1.c: In function ‘main’:
1.c:5: warning: return type of ‘main’ is not ‘int’
root@wl500g,~> ./a.out
hello world!
so, you see --- it is possible

26-01-2009, 10:31
did you have oleg or open/dd-wrt installed on your wl500 ?

when I do gcc --help i got ambigious command as a reply. So for my understanding my wl-hdd didn't know gcc ?!

I think that I dont't have to reboot after installing the dev-package...

26-01-2009, 11:09
I have wl500gp with oleg's fw. wl-hdd shouldn't make any difference. Check if you have buildroot package installed. It should have been installed as a part of optware-devel.

Reboot shouldn't be needed. Check with:

type gcc
that gcc is installed and is available through PATH variable.

26-01-2009, 12:48
thats it. buildroot pkg was missing. I've installed it and now gcc is known in the system path as well.

Thank you very much for your help.