开发者

How to make a command-line tool executable in OS X?

I just f开发者_如何学Pythoninished writing my very first command-line tool in Objective-C, compiled it, and now I'm curious about how one would go about making it executable as a command.

For example, right now to use the program I have to type in ./filename -args into Terminal. I'd like to be able to only type in filename and execute the program.

I tried using sudo chmod a+x filename but no go.


sudo cp filename /usr/local/bin/

Or add the directory containing filename into $PATH. Like as all other UNIX-derived OSs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜