4

When I build a project by visual studio 2013, it runs properly. But I encounter following errors after building with visual studio 2015. How can I solve this problem?

fatal error C1001: An internal error has occurred in the compiler. Command line error D8040: error creating or communicating with child process

1
  • "Internal error" means it's a compiler bug. Change your project settings so that it builds serially, file at a time, turn up logging verbosity, and once you identify the file it's crashing on, use the bisection approach (comment out half the file, compile, does the error still occur?) to isolate where the crash is happening.
    – kfsone
    Commented May 27, 2016 at 17:56

3 Answers 3

3

C1001 is an "ICE", an Internal Compiler Error. It means your code generated a fatal bug in the compiler. Are you using VS 2015, VS 2015 Update 1, or VS 2015 Update 2?

One way to find which version of the compiler you have installed is to run the Developer Command Prompt for VS 2015 and then run the following command: cl -Bv and note which versions are reported. VS 2015 Update 2 is 19.00.23918.0

An "ICE" is always a bug. If your code is doing something wrong, the compiler should emit an error or a warning, not crash out. It's also possible your code is just fine, and there's been a new bug introduced in the compiler since VS 2013. There's been a lot of work done to the compiler to fully support C++11 as well as support the upcoming C++14/C++17 drafts.

You should file a bug on VS Connect. See this article for directions on creating a good repro. This blog post is also a great write-up of how to narrow down compiler problems.

In most cases, it's very difficult to repro an ICE with just a few lines of code, and is only triggered in very specific contexts. This is why the instructions above are all about providing a minimal repro that captures the essence of the problem. You can also try a newer build compiler to see if the problem has already been fixed.

3

Many thanks Walbourn. Your solutions are so effective. I resolved this problem by the following settings in visual studio 2015:

1- Disable c/c++->general->Multi-processor compilation
2- Disable c/c++->general->optimization
3- Disable c/c++->language->open mp support
1

The probable reason could be long project path.

2
  • The problem is a bug in the compiler. It couldn't be a long project path since changing the settings of the compiler resolved the problem. For more information, read the other two answers posted.
    – user904963
    Commented Feb 22, 2022 at 17:00
  • Please phrase this as an explained conditional answer, in order to avoid the impression of implicitly asking a clarification question instead of answering (for which a comment should be used instead of an answer, compare meta.stackexchange.com/questions/214173/… ). For example like "If your problem is ... then the solution is to .... because .... ."
    – Yunnosch
    Commented Apr 30, 2022 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.