簡體   English   中英

我的 C++ hello world 程序無法使用 Build 腳本在 Atom IDE 中編譯

[英]My C++ hello world program fails to compile in Atom IDE using the Build script

所以,對於一些背景:我一直試圖在 atom IDE 中獲取構建包(因為顯然,atom 沒有運行或構建按鈕,我應該說這是多么浪費)現在工作了一段時間,細節我不想讓你厭煩,無論如何我已經掌握了一切,但一切都沒有定論。


所以這是我的代碼:

<#include <iostream>>
using namespace std;

int() {
  cout << "hello world"
  return 0;
}

我用這段代碼在 atom IDE 中測試構建包,看它是否可以編譯 c++ 代碼,但我得到了一個錯誤:

   " no eligible build target found "

我點擊了顯示堆棧跟蹤按鈕,這顯示:

   "No eligible build target.: No configuration to build this project exists.
at file///C:/Users/Administrator/.atom/packages/build/lib/build.js:113:15"

無論如何,畢竟我還有一個問題:

- 為什么這會發生在我身上,我能做些什么來解決這個問題?

如果您找到解決此問題的方法,請不要害怕回答,如果沒有,請進行一些研究,希望它可以幫助回答此問題的人

在 cout 語句后需要一個分號,並且需要將 main 函數定義為 main

int main() {
  cout << "hello world";
  return 0;
}

暫無
暫無

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

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