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 "172.16.22.8" 4547
Cannot run. and the error is like that bash: ./connection.o: cannot execute binary file