【问题标题】:Dev c++ mingw no longer compilesDev c++ mingw 不再编译
【发布时间】:2020-08-28 17:00:07
【问题描述】:

我使用的是 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

这是我新建项目的makefile:

# 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++,但这个问题仍然存在。

以前编译好的新项目和旧项目都不再编译... 有没有人遇到过类似的问题?

【问题讨论】:

  • 错误中的 url 将带您了解如何编写错误报告的非常好的说明。除其他外,它解释了需要一个最小的自包含测试用例。你的代码是什么?
  • 任何代码。我什至尝试过做一个简单的hello world,结果是一样的。
  • 你是编译c++还是c代码?
  • 我上面的例子是在 C 中。虽然到目前为止这在 C 和 C++ 项目中都发生过。
  • collect2 提示链接存在问题。

标签: c++ c compiler-errors dev-c++ mingw32


【解决方案1】:

链接器的某些东西拒绝为我工作。 我使用 TDM-GCC 安装了 mingw,并为此创建了一个新的编译器配置文件,它最终可以工作。

我仍然不知道为什么包含的mingw突然停止工作并且即使重新安装后也无法正常工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-06-01
    • 2021-03-03
    • 1970-01-01
    • 2013-08-02
    • 2016-08-11
    • 2011-10-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多