简体   繁体   English

我的 C++ hello world 程序无法使用 Build 脚本在 Atom IDE 中编译

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

so, for some background: I've been trying to get the build package in the atom IDE (since apparently, atom doesn't have a run or build button, what a waste should I say) to work for a while now, the details I don't want to bore you with, anyways I have everything up my sleeve but it all came out inconclusive.所以,对于一些背景:我一直试图在 atom IDE 中获取构建包(因为显然,atom 没有运行或构建按钮,我应该说这是多么浪费)现在工作了一段时间,细节我不想让你厌烦,无论如何我已经掌握了一切,但一切都没有定论。


so here's my code:所以这是我的代码:

<#include <iostream>>
using namespace std;

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

I used this code to test the build package in the atom IDE to see if it could compile c++ code but I got an error:我用这段代码在 atom IDE 中测试构建包,看它是否可以编译 c++ 代码,但我得到了一个错误:

   " no eligible build target found "

i clicked on the show stack trace button and this displayed:我点击了显示堆栈跟踪按钮,这显示:

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

anyways, after all this i still have a question:无论如何,毕竟我还有一个问题:

- why is this happening to me, and what can I do to fix this? - 为什么这会发生在我身上,我能做些什么来解决这个问题?

if you find a way to fix this then don't be afraid to answer, if you don't, do some research, hopefully it should help people who are answering this question如果您找到解决此问题的方法,请不要害怕回答,如果没有,请进行一些研究,希望它可以帮助回答此问题的人

you need a semicolon after your cout statement and your main function needs to be defined as main在 cout 语句后需要一个分号,并且需要将 main 函数定义为 main

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM