How to launch a mac application without a terminal window

前端 未结 1 567
Happy的楠姐
Happy的楠姐 2021-01-05 14:55

I\'ve written an open-source c++ application and it works fine on Windows and Linux, I finally got a Mac Mini (with 10.5.8) so I\'ve just been testing the Mac version.

1条回答
  •  盖世英雄少女心
    2021-01-05 15:31

    Mac binaries are set to be opened with the 'Terminal' program; there's no way around that, except by making a full application package, or have another program launch it via system or something like that.

    When double-clicking on a binary, the terminal window opens with ~ as the current directory. I suggest you use chdir(2) in your program to ensure it is running in the right directory if you need it in the first place.

    0 讨论(0)
提交回复
热议问题