Menu

Build Error

2006-01-23
2012-09-26
  • Nobody/Anonymous

    I just installed Dev-Cpp 4.9.9.2 with mingw. It installed with no errors. I tried to run a simple Windows Application (I added no code) and I get a weird build error:

    C:\Dev-Cpp\Makefile.win [Build Error] [main.o] Error -1073741515

    Since it might be relative to the problem, here is my Makefile.win:

    Project: Project3

    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"C:/Dev-Cpp/lib" -mwindows
    INCS = -I"C:/Dev-Cpp/include"
    CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
    BIN = Project3.exe
    CXXFLAGS = $(CXXINCS)
    CFLAGS = $(INCS)
    RM = rm -f

    .PHONY: all all-before all-after clean clean-custom

    all: all-before Project3.exe all-after

    clean: clean-custom
    ${RM} $(OBJ) $(BIN)

    $(BIN): $(OBJ)
    $(CC) $(LINKOBJ) -o "Project3.exe" $(LIBS)

    main.o: main.c
    $(CC) -c main.c -o main.o $(CFLAGS)

    Please let me know of any solutions. Thanks.

     
    • Anonymous

      Anonymous - 2006-01-23

      It would be more useful if you posted the entire Compile Log (a copy and paste from the Compile Log tab).

      Clifford

       
    • Nobody/Anonymous

      unterminated #ifdef

       
    • Anonymous

      Anonymous - 2006-01-24

      I an only imagine the 'unterminated #ifdef' comment came from someone with experience of that exact error, because I can see nothing in the OP indicating that.

      The error message in the OP simply indicates that make.exe has terminated because some command it executed returned a non-zero errorlevel. Which is why I asked for the full compile log. Normally the command that failed issues its own error message, which is the true cause of the failure.

      Note you need ot look at the 'Compile Log' tab, not the 'Compiler' tab - this is the raw compiler output and contains information that the compiler tab filters out.

      Clifford

       
    • Nobody/Anonymous

      Compile Log Tab:

      Compiler: Default compiler
      Building Makefile: "C:\Dev-Cpp\Source\First\Makefile.win"
      Executing make...
      make.exe -f "C:\Dev-Cpp\Source\First\Makefile.win" all
      gcc.exe -c main.c -o main.o -I"C:/Dev-Cpp/include"

      make.exe: *** [main.o] Error -1073741515

      Execution terminated

       
    • Anonymous

      Anonymous - 2006-01-26

      Does the make file run from the command line?

      Open a command console and change directory to C:\Dev-Cpp\Source\First, then enter:

      make -f makefile.win all

      You may need to add c:\dev-cpp\bin to the PATH environment variable first.

      It is strange that the full path for the makefile is shown in your compile log. Normally the makefile path and teh current working directory for a project are the same, so a path is not shown.

      A re-install may be in order.

      Clifford

       
    • Nobody/Anonymous

      When I tried the "make -f makefile.win all" from command line, I get a pop up error message:

      Title: sh.exe - Unable to Locate Component
      Message: This application has failed to start because cygwin1.dll was not found. Re-installing the application may fix this problem.

      I didn't think cygwin had anything to do with dev-cpp?? Thanks for all your help so far...

      Daniel

       
      • Anonymous

        Anonymous - 2006-01-27

        Cygwin includes a program called make.exe as does Dev-C++'s MinGW installation. However the cygwin make expects to run from the bash shell and invokes commands through sh.exe instead of cmd.exe.

        If you have Cygwin installed and it appears in the PATH environment variable before c:\dev-cpp\bin, it will pick up the wrong version.

        You can fix this my ensuring that you invoke the correct version of make. Under Tools|Compiler options|Programs, change make.exe to c:\dev-cpp\bin\make.exe. Alternatively uninstall Cygwin, place c:\dev-cpp\bin ahead of its path in the PATH environment variable.

        Clifford

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.