What are the best practices for choosing the linking method in VC++? Can anything/everything be statically linked?
On a dynamically linked project, is the relative/absolute location of the linked library important?
What are the pros and cons ?
added: I was mainly referring to lib files. Do they behave same as dll linking?
Dynamic links allow you to upgrade individual DLLs without recompiling your applications. That is why windows can be upgraded without your application being recompiled, because the dynamic linker is able to determine the entry points in the dll, provided that the method name exists.
Statically linking your application has a benefit in that calls to the linked code are not indirected, so they run faster. This may have an impact on extremely performance dependent code.
Using DLLs can also help you reduce your memory footprint, as effectively you only load the libraries as you need them and you can unload them when your done (think application plugins, only load an image browsing library when you have an image open etc.)
EDIT: Robert Gamble has added a comment which I missed: DLLs are loaded into memory shared by all processes in the operating systems. This means if two programs (or two instances of your program) use the same DLL, they will use the same DLL loaded into memory which will further reduce your overall memory usage.