加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – QtCreator返回错误“无法更改为工作目录”

发布时间:2020-12-16 09:52:34 所属栏目:百科 来源:网络整理
导读:我正在尝试使用Qt Creator运行一个简单的HelloWorld程序 码: #include iostreamusing namespace std;int main(){ cout "Hello World!" endl; return 0;} 运行时发生错误 Cannot change to working directory '/home/myusername/build-myproject-Desktop-Deb
我正在尝试使用Qt Creator运行一个简单的HelloWorld程序
码:

#include <iostream>

using namespace std;

int main()
{
  cout << "Hello World!" << endl;
  return 0;
}

运行时发生错误

Cannot change to working directory '/home/myusername/build-myproject-Desktop-Debug': file or directory not found

互联网上的许多教程告诉我禁用“在终端中运行”,但我需要这个用于我的项目.
我的工作目录是/ home / myusername / build-myproject-Desktop-Debug

有帮助吗?

解决方法

你在运行哪个操作系统?

我在Linux上遇到了同样的问题.我的解决方案是使用xterm并将Qtcreator中的默认终端设置为xterm(在菜单中:Tools,然后选项,然后是Environment,然后是Terminal,那里有“/usr/bin/xterm -e”)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读