CodeBlocks for Mac不会出现在终端中

时间:2016-09-05 17:42:20

标签: c++ xcode macos terminal codeblocks

正如您所看到的,我尝试过运行一个简单的声明,但它无法显示在终端中。我有xcode和xcode命令行。我不知道可能是什么问题,我下载xcode的目录是否有问题?或者Codeblocks?

As you can see, I've tried running a simple statement but it fails to show up in the terminal. I do have xcode along with xcode command line. I don't know what could be the problem, would it be a problem with the directory where I downloaded xcode? or maybe Codeblocks?

1 个答案:

答案 0 :(得分:1)

您的命令有几个空格。您应该通过重命名目录来删除该路径中的空格,或者您应该使用\转义空格字符或将命令放在"内。

例如:

g++ /home/user name/code.cpp // won't work
g++ /home/user\ name/code.cpp // escaping space character
g++ "/home/user name/code.cpp" // using quotation marks