digitalmars.D.learn - dynamically loading a dynamic library from the program
- Michal Kozakiewicz (21/21) Jul 28 2018 I read this article: https://dlang.org/articles/dll-linux.html
- Adam D. Ruppe (6/9) Jul 28 2018 You can load it exactly the same way you would from C. The
- Michal Kozakiewicz (2/11) Jul 28 2018 Thank you for your answer!
I read this article: https://dlang.org/articles/dll-linux.html However, I did not find the answer to my questions. ===== ===== ===== ===== Facts: a. I have closed-source dynamic library (DLL) on Windows (e.g.: AutoItScript). b. I do not know the language and compiler in which it was created. c. I can get a list of symbols from it. d. I have function definitions from this library. Questions: 1. In this case, can I use this library in the D language program? 2. How to create initialization? ===== ===== ===== ===== Facts: e. Subthread "Dynamically Loading a C++ DLL From a D Program", from the article above. f. I have a dynamic library created in C not C++ on Windows. Questions: 3. Is it possible to use it regardless of the compiler that created it (e.g.: MinGW, MSVC)?
Jul 28 2018
On Saturday, 28 July 2018 at 22:30:38 UTC, Michal Kozakiewicz wrote:1. In this case, can I use this library in the D language program? 2. How to create initialization?You can load it exactly the same way you would from C. The article you linked is about writing a DLL in D itself, but using a DLL from D is nothing special. Same functions as in C. The compiler of the dll doesn't matter.
Jul 28 2018
On Saturday, 28 July 2018 at 22:47:33 UTC, Adam D. Ruppe wrote:On Saturday, 28 July 2018 at 22:30:38 UTC, Michal Kozakiewicz wrote:Thank you for your answer!1. In this case, can I use this library in the D language program? 2. How to create initialization?You can load it exactly the same way you would from C. The article you linked is about writing a DLL in D itself, but using a DLL from D is nothing special. Same functions as in C. The compiler of the dll doesn't matter.
Jul 28 2018