How to link identical function names from different DLLs
(nullprogram.com)
from tedu to programming on 28 Aug 2023 06:26
https://azorius.net/g/programming/p/36M1l3xWkQkXM1zfJd-How-to-link-identical-function-names-from-differ
from tedu to programming on 28 Aug 2023 06:26
https://azorius.net/g/programming/p/36M1l3xWkQkXM1zfJd-How-to-link-identical-function-names-from-differ
For the typical DLL function call you declare the function prototype (via header file), you inform the link editor (ld, link) that the DLL exports a symbol with that name (import library), it matches the declared name with this export, and it becomes an import in your program’s import table. What happens when two different DLLs export the same symbol? The link editor will pick the first found. But what if you want to use both exports? If they have the same name, how could program or link editor distinguish them? In this article I’ll demonstrate a technique to resolve this by creating a program which links with and directly uses two different C runtimes (CRTs) simultaneously.
threaded - newest