I work in Linux with c++, using eclipse. But i have worked with Visual Studio too. They haven’t got (or at least I don´t know how to do it) a button to relink a project.
Example:
I have a big project (1), with hundreds of cpp. That project uses a small library (2) to do foo. If I change foo behavior, and compile it, generating a library, I need to clean the big proyect (1), re-compile, that links the external libraries (2) and works.
The problem is the big project doesn’t change, but with hundreds of cpps, its compile time is about 5 min. 5 min is a small change in a second library.
Is possible to avoid this problem?
Thanks in advance
You would generally use
makewith amakefilefor this.With this method, you can generate your own rules for building code, including bypassing compilation of lots of source files if you only thing needed is relinking.
For example, the
makefile:would not recompile
main.cif the only file you changed wasother.c. It would simply compileother.cto makeother.o, then linkother.oandmain.otogether to createprog.That’s generally how it’s done in the “command line” world. It’s likely that it’s also how it’s done behind the curtains in many IDEs as well, just hidden from you.
What you’ll need to find out is why the dependency checking is not working as expected. Without further information on how your project is set up, it’s a little hard to be definitive.