Question

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.

Était-ce utile?

La solution

You can use open, e.g.

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

or

system("open -a Terminal.app /path/to/script");
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top