Reputation: 1083
I have a situation in which I have three very large files A.cpp B.cpp C.cpp n.cpp
I don't want to compile these files, every time when i run the program,
any ideas what is the best possible way to exclude these files from compiling.
Upvotes: 0
Views: 74
Reputation: 1440
Every time you run your program the program will not get compiled. Compilation is one time process and linking is one time if you link statically on the time to compilation. The other one is linking at run time (dynamic linking).
In either case code will be compiled once that too if the source file is not changed then the compilation happens if you use the make file.
make clean; #if you execute this command before make all or make build, then all the .cpp files will be compiled
here clean, all, build are the target of the make file.
Refer the link for make
Upvotes: 2