c - 错误消息代码块 "no file or directory"

标签 c codeblocks

我之前编写并编译过文件,但今天我收到此错误消息

dawas-mbp:~ dawasherpa1$ /Users/dawasherpa1/Desktop/Programming 1/Strings/bin/Debug/Strings 
-bash: /Users/dawasherpa1/Desktop/Programming: No such file or directory
dawas-mbp:~ dawasherpa1$ 

最佳答案

目录名“Programming 1”中有一个空格,因此与

$ /Users/dawasherpa1/Desktop/Programming 1/Strings/bin/Debug/Strings

shell 尝试使用参数“1/Strings/bin/Debug/Strings”执行“/Users/dawasherpa1/Desktop/Programming”。您必须将整个路径用引号引起来

$ "/Users/dawasherpa1/Desktop/Programming 1/Strings/bin/Debug/Strings"

或者用反斜杠转义空格

$ /Users/dawasherpa1/Desktop/Programming\ 1/Strings/bin/Debug/Strings

执行你的程序。

关于c - 错误消息代码块 "no file or directory",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23174673/

相关文章:

c - 初始化静态大小的全局 malloc()

c - 获取 "dereferencing pointer to incomplete type ' 结构节点“”错误

使用指定主机名的 ocilib 连接 Oracle

C++11,GCC 4.8.1,Code::Blocks,线程,好头疼

c - Strtol()函数基本c

c++ - OpenGL:没有绘制

c - program.exe 已停止工作...请发现错误?

c - else if 语法错误?谁能帮忙找一下

c - 交叉编译时如何使用外部库?

c - Fisher 数检查结果不正确