![](/img/trans.png)
[英]Error: g++.exe: No such file or directory g++.exe: fatal error: no input files in Visual studio code?
[英]g++.exe: installation problem, cannot exec `as': No such file or directory
I'm trying to learn C++, I downloaded and installed g++ on Windows using Cygwin, following this tutorial: https://www.cs.odu.edu/~zeil/cs250PreTest/latest/Public/installingACompiler/#installing-the- mingw 編譯器
就像在教程中一樣,最后,我檢查是否安裝了 g++:
PS D:\Desktop\coursera_ODS_in_c-\Week 2> g++ --version
g++.exe (GCC) 3.4.5 (mingw-vista special r3)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
然后我嘗試運行這段代碼:
#include <iostream>
int main() {
int num = 7;
std::cout << "Values:" << num << std::endl;
std::cout << "Address: " << &num << std::endl;
return 0;
}
通過使用這個
PS D:\Desktop\coursera_ODS_in_c-\Week 2> g++ main.cpp
但我明白了:
g++.exe: installation problem, cannot exec `as': No such file or directory
你如何解決這個問題?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.