Question: I am looking at some c++/c code, the open source ovaldi project. I see that they include pcre.dll in the distribution and are making calls to functions in that library in the code; but they never load the dll; they just include the pcre.h header and seem to have access to the functions. Are they really just building with a static library and distributing pcre.dll on accident or is there a way to do this?

Answer: 
They DO load the dll, but just implicitly. You see, you can create a .lib file which is responsible for loading the dll and redirecting calls, link to the lib, include the header and that's it. In Visual Studio this is done automatically, when you set a dependency to a dll project
You can load dynamic libraries at startup, but then you're required to restart the program to reload the library if the library changes. Loading the library during runtime with `LoadLibrary` or `dlopen`(unix) allows you to update a dynamic library while the process is running. This is good for long running processes such as a server, but it also incurs extra overhead for reloading the library.