簡體   English   中英

在 CodeBlocks 下運行“hello world”程序

[英]Running a "hello world" program under CodeBlocks

#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。

我已經解決了這個問題。 我可以使用調試按鈕。 只是不能使用運行按鈕。 Tool Menu -> Setting -> Envrionment -> Terminal to lanuch console progrems(設置你的終端控制台程序)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM