Build or compile

后端 未结 6 964
终归单人心
终归单人心 2020-12-28 18:17

I have a theoretical question about the difference between compile and build. I\'m programming in a c++ project that takes a lot of time to build, so I have told to do build

6条回答
  •  执笔经年
    2020-12-28 18:41

    Compiling is just one of the steps in building. Any time you need to recompile, you will need to rebuild.

    Compiling just takes the source files and their included header files and generates an object file for each source file. Building also links these files together to create your executable. So if you change a source file, you need to build if you want a new executable to test. Compiling will just get you part way there.

提交回复
热议问题