tags:

views:

46

answers:

1

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.

+1  A: 

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.

James McNellis
Here is one more simple tutorial: http://www.infernodevelopment.com/how-create-dll-c-using-run-time-dynamic-linking
Rakesh K
Chek this out [DLL Tutorial For Beginners](http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c9855)
RP