0

When I compile any correct program on Dev-Cpp, it could be:

#include <bits/stdc++.h>
using namespace std;

int main() {
    cout << "Hello World!";
    return 0;   
}

then it shows the following compile error:

 D:\Development\C++\Makefile.win [Build Error]  [main.o] Error -1073741819 

specifically this:

Compiler: Default compiler
Building Makefile: "D:\Development\C++\Makefile.win"
Executing  make...
make.exe -f "D:\Development\C++\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"D:/PROGRAM/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"D:/PROGRAM/Dev-Cpp/include/c++/3.4.2/backward"  -I"D:/PROGRAM/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"D:/PROGRAM/Dev-Cpp/include/c++/3.4.2"  -I"D:/PROGRAM/Dev-Cpp/include"   

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

Execution terminated

where D:/PROGRAM/Dev-Cpp is where I store Dev-Cpp, D:\Development\C++ is where I store the .dev file as well as the source code of the project

I've tried looking up this error online, but can't find any solution. What should I do?

Edit: I have tried replacing #include <bits/stdc++.h> by #include <iostream>, but the results are unchanged. I also tried some sample Dev-Cpp C++ programs in Dev-Cpp\Examples folder but they still don't work and give the same result. My Dev-Cpp Version is 4.9.9.2

  • 3
    *When I compile any correct program* -- `#include ` -- This header does not exist in standard C++, or in any *good* C++ book. So the conclusion is that you're learning C++ from poor websites. With that header, you included everything under the sun, instead of simply just `#include `. – PaulMcKenzie Mar 27 '23 at 14:07
  • 2
    [Why should I not `#include `?](https://stackoverflow.com/questions/31816095/why-should-i-not-include-bits-stdc-h) – 463035818_is_not_an_ai Mar 27 '23 at 14:07
  • 1
    How you found nothing online? -1073741819 in hex is 0xC0000005 that is Windows error code about access violation. Rather common error so both forms are mentioned on innumerable pages. – Öö Tiib Mar 27 '23 at 14:21
  • 1
    Not use dev-cpp is my snarky response. I have never viewed as an IDE worth considering. I get that one of the many forks might be okay these days, but it's not worth wading through all that when you have better choices out there like VS, VSC, CLion, or the WSL and all that Linux has to offer. – sweenish Mar 27 '23 at 14:21
  • I tried not using `#include `, but it didn't work. I also tried compiling some Dev-Cpp sample programs, but it gives the same result. I have tried searching with the HEX code of that error, but it seems that no similar error has been resolved or asked. *I updated my question.* – thanhgaming5550 Mar 28 '23 at 15:50

0 Answers0