質問

I'm porting an app i've been working on from Linux to Mac and i'm having trouble with one specific line:

system(gnome-terminal -x sh -c \"/home/mrmartin/NetBeansProjects/Consumer/dist/Debug/GNU-Linux-x86/consumer\"");

Obviously this is because gnome-terminal is gnome linux only but i can't seem to find the Mac equivalent.

役に立ちましたか?

解決

You can use open, e.g.

system("open -a Terminal.app");

or

system("open -a Terminal.app /path/to/script");
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top