Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mogallin

macrumors member
Original poster
Iv'e written a piece of c++ code (a command line tool) in Xcode which runs fine within Xcode and the terminal file at project/build/release also runs as it should. However, when I move this file to my laptop and try opening it in terminal all I get is a message saying something like "Permission denied". The program don't start.

Moving the project to the laptop and building it it runs fine on the laptop but not on the desktop.
Both computers run OS 10.6.4 and Xcode 3.2.

How should I do with Xcode or other software to get a file which I can run on different computers without compiling it on each one of them?
 
Thanks for the answers.

The chmod-thing worked perfectly.

Do you know of any way to make these permissions stick so that one will not have to change the permissions every time the program is moved to a new computer?
 
Do you know of any way to make these permissions stick so that one will not have to change the permissions every time the program is moved to a new computer?
Not in the file itself. The permissions are metadata stored in the filesystem. If you use a file system that doesn't understand them (FAT32/CD-ROM/e-mail,...) you will lose them.

You could package the app in a tar/zip/dmg file with the right permissions and unpack it that way on the machines you distribute to.

B
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.