Reputation: 751
I have a C++ project that references a lib, which references a dll. In my case I want to create a setup package that includes all necessary files (e.g. assemblies etc.) and hence I need this referenced assemblies to be included in the setup package as well.
Is there a way to know which assemblies a lib references? I do execute a PowerShell that has access to and reads the project file in order to identify all necessary files, but this in-direct referenced assembly is not listed somewhere in the project file itself.
Disclaimer: I'm not an expert by any means when it comes to native C++ projects
Upvotes: 1
Views: 216
Reputation: 30605
The SDK tool "dumpbin" has various options to assist as well;
dumpbin /imports
link /dump /imports
If you are building the lib into a project, once compiled you can use "Dependency Walker" to view the dependencies. It is available from its website and as part of the Windows Driver Kit; the versions may differ. Note; beware of the use on newer platforms, as commented below.
In general, the SDK utilities are the most up to date and correct for the targets you are using.
Upvotes: 2