On a computer using Ubuntu Linux, I have written a program called Gwx with Code::Blocks 10.05. On this machine, the owner is George. I put in a USB flash drive and drag the whole directory containing Gwx over to the flash drive. That is, I copy it to the flash drive. I open a terminal window, navigate over to the flash drive and in the /Gwx/bin/Release directory. I do
ls -l
and find
-rwxr-xr-x 1 george george 88896 2012-09-13 00:01 Gwx
That looks good and I do
./Gwx
and the program executes just fine.
Then I properly close the flash drive and take it over to my wife's computer, where the owner's name is Joan. I put in the flash drive, navigate to the same directory as before, do ls -l and find
-rw-r--r-- 1 joan joan 88896 2012-09-13 00:01 Gwx
Notice that the x's in the permissions have been all changed to -. All efforts with “chmod u+x Gwx” or “chmod a+x” or “sudo chmod u+x” fail to make any change in the permissions. Needless to say, trying to execute the program with ./Gwx produces only a “Permission denied” message.
How do I get a program built with Code::Blocks on one Ubuntu Linux machine to run on another Ubuntu Linux machine?
Since Code::Blocks 10.05 is installed on both machines, I have also tried to open the project file and rebuild it on the second machine. Code::Blocks seems to find all the files successfully, and seemingly builds successfully, but when execution starts, it terminates immediately with a 255 error message. So a related question is, How can I work on the project on two different computers, both running Ubuntu Linux and Code::Blocks 10.05?