Checking that all libs and dlls are from the same build?

98 Views Asked by At

I am developing a program in VS C++ 2008.

Right now, I have a huge list of dll and lib dependencies and I am adding some more. I worry that when I need to update a dependency by building from source (where I have to manually replace built dlls and libs in the correct place), if I accidently forgot to replace something or vice versa, I may run into a compile and/or runtime problem. And finding which place goes wrong can be a bit difficult.

So is there some sort of program or method out there that can suit this task to ease building a program with many updating dependencies?

3

There are 3 best solutions below

0
sbi On BEST ANSWER

You could add scripts as post-build steps into your DLL projects which automatically copy the results into a common directory (something like $(SolutionDir)$(ConfigurationName) might be fine, unless you use different projects configurations for the same solution configuration). Or you just set all the projects' output directories to such a common directory.

Then, when you build the whole solution, you know you have the latest versions of all these files in that directory.

0
Hans Passant On

Avoid making this complicated. A Visual Studio solution can contain as many projects as you need to build all dependencies. Build + Clean will delete all binaries, Build + Build will rebuild them. Just make sure that Build + Clean deletes every .lib that you've got a dependency on.

0
Daniel Dyson On

Refix is a great tool for checking dependencies: http://refix.codeplex.com/