cannot execute binary file

Hi when I run my program, I got "cannot execute binary file". Why is that so? If anyone know, pls kindly tell me. Thanks
closed account (Dy7SLyTq)
whats the exe called? cause if it was compiled on mac or windows it wont work
I will describe you more about my situation. Actually I m trying to connect my laptop and my robot with TCP/IP socket programming. My robot also used ubuntu OS as well. My compiler to compile my program and the rest of my robot programs is G++ compiler. So after I wrote my program, I opened the directory which it is located in terminal. And I used

sudo su

for as a root user

after that I used

sudo make

to make "Makefile" between my program and the rest of programs. I was ok until that.

And after that I run my program like this

./connection.o "" 4547

Cannot run. and the error is like that
bash: ./connection.o: cannot execute binary file

Why is that so? Thanks

Last edited on
I am also using ubuntu 11.10.
`connection.o' is just an object file, it is not executable.
Post your makefile

In general, you shouldn't `make' as root.
closed account (Dy7SLyTq)
and u shouldnt compile as root because then you can only edit and compile as root. and if your already su then u dont need to use sudo
Topic archived. No new replies allowed.