c++ - Dev c++ mingw 不再编译
问题描述
我正在使用 Dev C++ 4.9.9.2,我的程序从昨天开始就停止编译。我的编译器错误看起来像这样:
F:\Program\Makefile.win [Build Error] [Program.exe] Error 1
编译日志消息为:
Compiler: Default compiler
Building Makefile: "F:\Program\Makefile.win"
Executing make...
make.exe -f "F:\Program\Makefile.win" all
gcc.exe Untitled1.o -o "Program.exe" -L"F:/Dev-Cpp/lib"
gcc.exe: Internal error: Aborted (program collect2)
Please submit a full bug report.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.
make.exe: *** [Program.exe] Error 1
Execution terminated
这是我新建项目的生成文件:
# Project: Program
# Makefile created by Dev-C++ 4.9.9.2
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES =
OBJ = main.o $(RES)
LINKOBJ = main.o $(RES)
LIBS = -L"F:/Dev-Cpp/lib"
INCS = -I"F:/Dev-Cpp/include"
CXXINCS = -I"F:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"F:/Dev-Cpp/include/c++/3.4.2/backward" -I"F:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"F:/Dev-Cpp/include/c++/3.4.2" -I"F:/Dev-Cpp/include"
BIN = Program.exe
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS)
RM = rm -f
.PHONY: all all-before all-after clean clean-custom
all: all-before Program.exe all-after
clean: clean-custom
${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o "Program.exe" $(LIBS)
main.o: main.cpp
$(CPP) -c main.cpp -o main.o $(CXXFLAGS)
我尝试重新安装 mingw 并将新的编译器配置文件链接到它,我也尝试重新安装 Dev C++,但这个问题仍然存在。
以前编译好的新项目和旧项目都不能编译了……有没有人遇到过类似的问题?
解决方案
链接器的某些东西拒绝为我工作。我使用 TDM-GCC 安装了 mingw 并为此制作了一个新的编译器配置文件,最终可以正常工作。
我仍然不知道为什么包含的mingw突然停止工作并且即使在重新安装后也不能正常工作。
推荐阅读
- node.js - 如何在节点 js mongoose 聚合中一起使用 $count 和 $project
- javascript - 在 if 语句上访问数组
- ssl - What are the supported cipher suites in sim800c?
- java - 我如何使用 TextView 修复 AsyncTask 错误
- javascript - 重定向到新页面时代码未执行
- java - Java Swing - 在 JPanel 中获取源代码
- python-3.x - 在运行测试时让 Pytest 在路径中包含 prod-dir 对我来说并不明显
- agora.io - Agora 多对一直播
- python - 在具有范围的 for 循环的最后一次迭代中获取余数
- html - 如何使用 CSS 创建父图像并缩放子图像?