Menu

Fatal Error

Compiling
JTGeorge
2019-02-26
2019-02-27
  • JTGeorge

    JTGeorge - 2019-02-26

    I have install, uninstall and reinstall dev c++ from sourceforge many times. Everytime I get the same error in compiling a project even if I have a program like:

    #include <stdio.h>
    #include <stdlib.h>
    
    /* run this program using the console pauser or add your own getch, system("pause") or input loop */
    
    int main(int argc, char *argv[]) {
        printf("hello");
        return 0;
    }
    

    The error is called fatal error and the exact description is:

    can't create main.o: No such file or directory
    recipe for target 'main.o' failed
    

    The Makefile.win file is:

    # Project: Project1
    # Makefile created by Dev-C++ 5.11
    
    CPP      = g++.exe
    CC       = gcc.exe
    WINDRES  = windres.exe
    OBJ      = main.o
    LINKOBJ  = main.o
    LIBS     = -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib" -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib" -static-libgcc
    INCS     = -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include"
    CXXINCS  = -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++"
    BIN      = Project1.exe
    CXXFLAGS = $(CXXINCS) 
    CFLAGS   = $(INCS) 
    RM       = rm.exe -f
    
    .PHONY: all all-before all-after clean clean-custom
    
    all: all-before $(BIN) all-after
    
    clean: clean-custom
        ${RM} $(OBJ) $(BIN)
    
    $(BIN): $(OBJ)
        $(CC) $(LINKOBJ) -o $(BIN) $(LIBS)
    
    main.o: main.c
        $(CC) -c main.c -o main.o $(CFLAGS)
    

    I have tried running dev c++ as administrator, downloading iostream.h-ftream.h and copying them in the 'include' directory of compiler even if changing the compile from 64bit to 32bit(with no hope).None of them is working


    Any other solutions?

     
  • JTGeorge

    JTGeorge - 2019-02-27

    After a lot of searching I discovered that the real time protection of the antivirus program or the firewall of windows reads the extention ".exe" as a virus and causes this fatal error so you only have to disable real time protection.

     

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.