Quote:I am talking about the definition of dynamic linking.
Well, it all depends on *what* you are talking about when you say dynamic.
Quote:That is incorrect. You need to know the name of the entry point ahead of time, but you can load and unload dynamic libraries as much as you want at run-time.
You can't, for example, take a standard dll and link it during runtime, it must be done during design, because there is no way to *get* the table at that point.
Quote:No, the operating system takes care of getting the function addresses based on the DLL's symbol export table.
The compiler itself has to take the table you give it and figure out where the entry points are, so that it will link correctly.
Quote:In the sense that you are making false statements about dynamic linking, it's quite misleading. :-)
There is no mechanism to handle that with standard dlls at runtime. So, no, its only misleading in the sense that I was perhaps not clear enough.
Quote:No... you do need to know the symbol names, so that you can request them from the dynamic library, but you don't need to have a full compiler interface and so forth.
For standard ones, if you don't know the entry points and you don't have a .h or .tbl file describing the interface for a compiler, you can't use it *period*.
Regardless, the linking happens at runtime, not compile time.
Fact remains that the main difference is *when* you can link them. And I know of no case where its possible to link a non-ActiveX dll into an application *after* the application is already compiled and running. Possible? Maybe. Very, very difficult? Definitely. Supported *at all* as a valid method of using one? No.
I'm sorry, Shadowfyr, this is plain and simply wrong. You link into dynamic DLLs all the time. Load up Lua and do a require statement of a C library. What do you think that is doing? It's opening up the dynamic library at runtime and looking up the appropriate symbols.
And Lua didn't even need to be compiled to be at all aware of that library! All it needs is the symbol name.
What do you think the SMAUG dlsym functions are for? ... loading up libraries at runtime.
What do you think happens when programs load and unload plugins at runtime? ... dynamic linking and unlinking.