Reputation: 1683
I want to create a .dll (in C++) that uses RAPI. For this I create the visual studio project and then I set the additional include directories to the place where I have "rapi2.h" needed, and also the additional link directories to the place where rapi.lib is located.
Then I write another application using my created .dll file. This method works fine, but at runtime I need rapi.dll to be existent on the computer running my application.
Is there any way to add a .dll into another .dll s that the first is not needed at runtime?
Maybe this is a beginner question, but why do I need the dll at runtime but at compilation is enough only the .lib, and .h associated?
Upvotes: 1
Views: 790
Reputation: 2450
You need to understand the difference between dynamic linking and static linking. In your case, the lib is an import library only and does not contain actual executable code. That is dynamically linked at runtime.
Upvotes: 2