I use the Code :: Blocks development environment to study programming in C ++, and even small programs compile for a long time (10-15 seconds). This mainly happens when using for loops

Closed due to the fact that the issue is too common for the participants Abyx , pavel , Ivan Pshenitsyn , user194374, aleksandr barakin 18 Aug '16 at 6:14 .

Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • And anyway, is this compilation speed normal? Maybe this is a feature of this IDE? Or do other development environments work at a similar rate? - MrRobot
  • one
    antivirus disable ... - pavel
  • @pavel Not an option - MrRobot

1 answer 1

show an example of the program, tell the configuration of your computer (memory, processor, OS, ssd or hdd), show the build settings

  • can you collect in 1 kernel (IDE СLion, by the way, automatically uses transfers all the kernels to the compiler)

  • maybe you have the maximum optimization enabled, which always slows down the builds.

  • maybe in Code :: Blocks there is a setting to use precompiled headers (IDE DevShed C ++ and its descendants compile them during installation, how about CB - I don’t know)

  • maybe your build system is configured incorrectly and instead of compiling only the changed files, you compile all the files in a row.

  • the idea of ​​antivirus, by the way, is not bad, it is quite possible to include directories with include-files, a compiler and ide in the list of exceptions

IDE has nothing to do with it, code :: blocks on Windows uses the mingw-version of gcc, if memory serves me (like almost all free IDEs). The speed of his work in Windows is not very well known to me, but you can search.

You can try to connect the free version of the compiler from Microsoft, or connect the clang , which usually compiles faster gcc

If you are on Windows, you can try to figure it out yourself, with the help of, for example, Process Monitor . See what the compiler does and at what moments it slows down.