我想在XCode上用c ++打开一个额外的程序。 这是Firefox。 但是如果我做了
Shell Execute("file://localhost/Applications/Firefox.app");
发生错误'ShellExecute' was not declared in this scope
在其他论坛中,有一个线索包括windows.h和shellapi.h
#include <shellapi.h>
#include <windows.h>
但这会产生其他错误
shellapi.h: No such file or directory
windows.h: No such file or directory
我该怎么办?我想在Mac上的XCode中使用c ++打开frefox吗?
答案 0 :(得分:0)
答案 1 :(得分:0)
尝试在终端中运行此功能以打开Firefox:
wp_get_object_terms
如果这样做你想要的,你需要将它包装在open -a Firefox http://www.ibm.com
中,如下所示:
system()
答案 2 :(得分:0)
我尝试使用chrome进行相同操作,但必须将其设置为反逗号:
int main() {
system("open -a 'Google Chrome'");
return 0;
}
用撇号有效!