如何使用 atom 脚本包在 atom 中 运行 c++?
How to run c++ in atom with the atom script package?
我有一台 windows 10 计算机,其原子版本为 1.52.0 和 g++ (MinGW.org GCC Build-2) 9.2.0。我可以使用 gpp 编译器在 Atom 中 运行 c++ 程序,但我不喜欢程序输出在新的 window 中而不是在 Atom window 的底部。我正在尝试使用脚本包设置 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.
我可以 运行 java 使用脚本包顺便说一句。 screenshot
回复有点晚。但是对于那些从 Google 来这里的人来说,在 script package page 上,它清楚地写着:
+---------+------------+-----------------+------------------+--------------------+---------------------------------------------------------+
| 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. |
+---------+------------+-----------------+------------------+--------------------+---------------------------------------------------------+
仅适用于 macOS 和 Linux。 运行 与 -std=c++14
.
所以,它似乎不适用于 Windows。相反,您可以使用另一个名为 gpp-compiler
的包:
https://atom.io/packages/gpp-compiler
它在 windows 上运行良好:
You'll need to install MinGW and add it to your PATH.
我有一台 windows 10 计算机,其原子版本为 1.52.0 和 g++ (MinGW.org GCC Build-2) 9.2.0。我可以使用 gpp 编译器在 Atom 中 运行 c++ 程序,但我不喜欢程序输出在新的 window 中而不是在 Atom window 的底部。我正在尝试使用脚本包设置 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.
我可以 运行 java 使用脚本包顺便说一句。 screenshot
回复有点晚。但是对于那些从 Google 来这里的人来说,在 script package page 上,它清楚地写着:
+---------+------------+-----------------+------------------+--------------------+---------------------------------------------------------+
| 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. |
+---------+------------+-----------------+------------------+--------------------+---------------------------------------------------------+
仅适用于 macOS 和 Linux。 运行 与 -std=c++14
.
所以,它似乎不适用于 Windows。相反,您可以使用另一个名为 gpp-compiler
的包:
https://atom.io/packages/gpp-compiler
它在 windows 上运行良好:
You'll need to install MinGW and add it to your PATH.