PDA

View Full Version : C program execution error


derm0
January 25th, 2006, 11:20 AM
Hi All,

I've recently written a c program which I'm almost positive is error free and which compiles with no errors using gcc.

However when I try to execute the a.out file of the program i get the error "cannot execute binary file".

I was wondering if anyone would have any suggestions on why I'm getting this error and how I might fix it??

Thanks for your time,
Derm

ubuntumaneh
January 25th, 2006, 11:23 AM
maybe, this a permission problem. See the permission with:

ll a.out

Try also:
chmod +x a.out

ubuntumaneh
January 25th, 2006, 11:24 AM
maybe, this a permission problem. See the permission with:

ll a.out

Try also:
chmod +x a.out

derm0
January 25th, 2006, 12:14 PM
Hi,

It's not a permission problem - i used chmod to change the permission to make sure i had execution rights and it made no difference.

Anyone have any other suggestions??

Thanks,
Derm

otake-tux
January 25th, 2006, 12:35 PM
are you typing ./a.out ?

derm0
January 25th, 2006, 02:37 PM
That was spot on,

Thanks a mil,
Derm