unix executable file

I am using Mac OSX. I've written and debugged a program, and compiled with g++ from the command line using

 
$ g++ tictac.cpp -o tictac; ./tictac


This gives a file with no extension (described in Finder as a Unix Executable File(UEF) ) which opens and runs fine.

The problem arrises when I attach it and send it via email. I first sent it to another mac. When downloaded it doesn't open, even from command line. It is no longer recognised a UEF. This even happens if I download it back on to my mac.

I had similar problems when I flag as -o tictac.exe and sent to a windows machine.


I'm new to this so apologise if this is in an FAQ somewhere (I have checked).

Thanks in advance.

EDIT:

Okay, I now realise that this is a permissions problem. When I download the attached file and then change permission to executable it works.
Last edited on
Topic archived. No new replies allowed.