g++.exe:安装问题,无法执行“as”:没有那个文件或目录
g++.exe: installation problem, cannot exec `as': No such file or directory
我正在尝试学习 C++,我使用 Cygwin 在 Windows 上下载并安装了 g++,遵循本教程:
https://www.cs.odu.edu/~zeil/cs250PreTest/latest/Public/installingACompiler/#installing-the-mingw-compiler
就像在教程中一样,最后,我检查是否安装了 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
你是怎么解决的?
我正在尝试学习 C++,我使用 Cygwin 在 Windows 上下载并安装了 g++,遵循本教程: https://www.cs.odu.edu/~zeil/cs250PreTest/latest/Public/installingACompiler/#installing-the-mingw-compiler
就像在教程中一样,最后,我检查是否安装了 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
你是怎么解决的?