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
I am not sure I understood your question fully.
Compiling is only a part of the build process (which consists of preprocessing, compiling, linking, and possibly others). It creates object files which linker then links into an executable, so only compiling is not enough.
If your question is really whether you should run full build of your software, then sometimes you don't have to if you have only changed the implementation (.cpp) files, but if you have also changed declarations (i.e. headers) then you will most likely need to do it. In any case, you will have to fully build the affected component - not just compile it.