I've got two C++ packages A and B where A depends on B. I'd like to break this dependency by having A swallow a minimal part of the B code, so that B can be tossed out entirely.
Does anyone have any advice for how I could profile package A to find out exactly with classes/functions,etc I need to bring in from B?
EDIT: I simply removed package B and went though (a lot of) cycles of compile A, copy files from B, updated Makefile.am accordingly. Now I'm pretty sure I've bloated package A with more stuff than was needed. How might I find sections of A` code that are never used in the executable/libraries that come out of it?
I think there are three possible ways of action:
Really import only what is needed: Undo what you did, and do it again, but this time do not copy whole files from B but merely the single functions that the compiler tells you are missing.
On your current situation, let some tool analyze the code for you (see Looking for a free source code analyzer (Function depedency tree) and Looking for a free source code analyzer (Function depedency tree)), or write extensive code using all of A and run a code coverage analysis.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With