I have a c++ application which is using a DLL. Now, I want to access a method from that DLL in my application. But, compiler is giving me "unresolved external symbol" error as it is unable to find the method even though my function in DLL is exported properly. When I include .lib file path of respective DLL in my application's additional dependencies, the error got resolved and application is working properly.
But, some people told me that I should not include .lib file when I am using a DLL. It is just like statically linking the DLL.
1) Is inclusion of .lib file when using DLLs in application, is good practice or not ?
To avoid this .lib file inclusion and to avoid calling GetProcAddess for every exportable method, they suggested me to write some wrapper class and create a virtual method to access the method from the class in DLL. I didn't understand this approach.
2) Can anybody explain why I need the wrapper class and how this abstract class can provide me the function I required ?
Thanks in advance.