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
Compiling is the act of turning source code into object code.
Linking is the act of combining object code with libraries into a raw executable.
Building is the sequence composed of compiling and linking, with possibly other tasks such as installer creation.
taken from What is the difference between compile code and executable code?
Therefore, you only need to (re-)compile object-code that is older ("has been edited more recently") than the source file to link an executable that contains the newest changes in your program. In fact, this is how make decides whether to build a file.