[英]How to run c++ in atom with the atom script package?
I have a windows 10 computer with atom version 1.52.0 and g++ (MinGW.org GCC Build-2) 9.2.0.我有一台 Windows 10 计算机,atom 版本为 1.52.0 和 g++ (MinGW.org GCC Build-2) 9.2.0。 I can run c++ programs in Atom with the gpp-compiler, but I don't like how the program output is in a new window rather than at the bottom of the Atom window.
我可以使用 gpp 编译器在 Atom 中运行 c++ 程序,但我不喜欢程序输出在新窗口中而不是在 Atom 窗口底部的方式。 I'm trying to set up c++ with the script package, but when I run the program with the script package I get the following error.
我正在尝试使用脚本包设置 c++,但是当我使用脚本包运行程序时,出现以下错误。
g++: error: /mnt/c/Users/user/Documents/USACO/2015-2016/December/Silver/test.cpp: No such file or directory
g++: fatal error: no input files
compilation terminated.
I can run java programs with the script package btw.我可以使用脚本包 btw 运行 java 程序。 screenshot
截屏
A bit late to reply.回复有点晚了。 But for those to come here from Google, on the script package page , it clearly says:
但是对于那些从谷歌来到这里的人,在脚本包页面上,它清楚地写着:
+---------+------------+-----------------+------------------+--------------------+---------------------------------------------------------+
| Grammer | File Based | Selection Based | Required Package | Required in PATH | Notes |
+---------+------------+-----------------+------------------+--------------------+---------------------------------------------------------+
| C++ | Yes | Yes | | xcrun clang++/g++ | Available only on macOS and Linux. Run with -std=c++14. |
+---------+------------+-----------------+------------------+--------------------+---------------------------------------------------------+
Available only on macOS and Linux .仅在macOS和Linux上可用。 Run with
-std=c++14
.使用
-std=c++14
。
So, it seems it's not available for Windows.因此,它似乎不适用于 Windows。 Instead, you can use another package called
gpp-compiler
: https://atom.io/packages/gpp-compiler相反,您可以使用另一个名为
gpp-compiler
包: https : gpp-compiler
It works fine on windows:它在 Windows 上运行良好:
You'll need to install MinGW and add it to your PATH .
您需要安装MinGW并将其添加到您的 PATH 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.