在CodeBlocks下运行“ hello world”程序

问题描述

#include <iostream>
using namespace std;

int main()
{
    int a {};
    a = 10;
    cout << "Hello world!" << a << endl;
    return 0;
}

然后我在下面出现错误:

-------------- Run: Debug in First (compiler: GNU GCC Compiler)---------------

Checking for existence: /home/oem/CPlus/First/bin/Debug/First
Set variable: LD_LIBRARY_PATH=.:
Executing: xterm -T First -e /usr/bin/cb_console_runner LD_LIBRARY_PATH=:. /home/oem/CPlus/First/bin/Debug/First  (in /home/oem/CPlus/First/.)
Process terminated with status -1 (0 minute(s),0 second(s))

我的系统是Linux mint20。 g ++和gcc均为9.3.0。

解决方法

我已经解决了这个问题。 我可以使用调试按钮。只是不能使用运行按钮。 工具菜单->设置->环境->终端到lanuch控制台程序(设置终端控制台程序)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...