c++ - g++.exe: 安装问题, 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 编译器
就像在教程中一样,最后,我检查了 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
你如何解决这个问题?
解决方案
推荐阅读
- java - 为什么 sonar-maven-plugin 在加载全局设置或活动规则时挂起?
- jmeter - 在 Jmeter JDBC 请求中运行初步语句
- c# - 在代码隐藏中更改项目后刷新 TreeView
- python - Pyspark - 根据来自不同数据框的值向数据框添加列
- node.js - rm -rf 用 Node.js 编写
- terraform - 可选地图作为列表
- python - 如何在 OpenCV 中检测出这张脸是谁的脸?
- docker - 纽曼 Docker 错误:未知选项 `--url'
- php - 从 vbscript 返回值到调用 php 代码
- livecharts - 实时图表删除轴