I am having problems linking C / C ++ libraries with both static (.lib / .a) and dynamic (.dll / .so) in D. From what I understand, it is possible to tell the compiler DMD link to .lib files and that you can convert DLL files to .lib using the implib tool that Digital Mars provides. Also, I came across this page, which implies the ability to call functions in .dll by converting C header files to interface files D. Are both of these methods equivalent? Will the same methods work for Unix library files? In addition, how could one reference these reference functions, enumerations, etc. From these libraries and how to tell their D-compiler to link with these libraries (I use VisualD in particular)? If anyone could provide some examples of links .lib, .dll, .a and .so files from D-code, I would be very grateful.
source
share