The process has nothing to do with #include
, even less with namespace
.
This has to do with linking of the code. When it will use some DLL the executable is generated in a form that is indicated that the exact code will be taken from the DLL at the moment of execution and some information is put to make the call dynamic call. When calling the executable it will look for the DLL and load as necessary making an adaptation of the temporary address that had been placed in the executable to the actual address of the code present in the DLL.
The only relationship with #include
is that the build needs to know the function signatures that will be called in the DLL. This is only information for the compiler, the DLL code will not be placed next to your code. Even if you have any errors in the header you will have problems during execution. The .h
must have information synchronized with the code that is in the DLL.