I have a console application in C++. I need to access a functionality from a C++ DLL. How do I link the DLL from my console application?
Please help me in this regard.
Thanks,
Rakesh.
I have a console application in C++. I need to access a functionality from a C++ DLL. How do I link the DLL from my console application?
Please help me in this regard.
Thanks,
Rakesh.
It depends on whether you are using load-time or run-time dynamic linking.
With load-time dynamic linking, you simply link against the import library for the DLL and make sure the DLL is in the right location when you run. With run-time dynamic linking, you need to use LoadLibrary
and GetProcAddress
to make calls into the DLL.
Both are described in detail on MSDN, with examples.