digitalmars.D.learn - Static/dynamic dlls
- Karl (2/2) Jul 27 2007 I can't understand the difference between a static and a dynamic dll.
- Daniel Keep (15/18) Jul 27 2007 I don't think there's any such thing as "static dll"s and "dynamic
- novice2 (4/6) Jul 27 2007 imho, sometimes this terms used (may be not correctly?) to distinguish d...
- Karl (3/6) Jul 30 2007 I've been trying to statically link a d program with a dll that calls d ...
- Karl (3/6) Jul 30 2007 I've been trying to statically link a d program with a dll that calls d ...
- Karl (2/11) Jul 30 2007 I've got one more question related to this. I must import something in m...
- Neal Alexander (2/13) Aug 01 2007 http://www.digitalmars.com/ctg/implib.html
I can't understand the difference between a static and a dynamic dll. A little help please hehe.
Jul 27 2007
Karl wrote:I can't understand the difference between a static and a dynamic dll. A little help please hehe.I don't think there's any such thing as "static dll"s and "dynamic dll"s. I think you have your terminology mixed up. A "static library" is a bundle of code and data, and so is a "dynamic link library" (which are commonly called "DLLs"). The difference is that a static library is designed to be linked into a program at compile time, and a DLL is designed to be linked into a program at run time. Static libraries are generally .lib files, whilst DLLs are .dll files. The only other thing to be careful of is that there are various kinds of .lib files, not all of which are compatible with each other. For instance, DigitalMars' linker doesn't work with .lib files compiled for current versions of Visual C++. DLLs, on the other hand, tend to work fine once you're got an interface for them. Hope that helps. -- Daniel
Jul 27 2007
I don't think there's any such thing as "static dll"s and "dynamic dll"s. I think you have your terminology mixed up.imho, sometimes this terms used (may be not correctly?) to distinguish dll loading method. "static dll" sometimes means "compiler-handle dll loading". in this case you just say to compiler, that you want to use exterlanl function in some dll. then compiler generate exe such manner, that OS or helper code must load needed dll while exe starting. in windows it create import section in exe file, so windows must load dll or generate error else. "dynamic dll" sometimes means "programmer-handle dll loading". in this case programmer write own code to find and load need dll and unload it if it not needed. in windows it can be done with LoadLibrary() api function. i am repeat, that i can mistake and termynology misunderstanding.
Jul 27 2007
Karl Wrote:I can't understand the difference between a static and a dynamic dll. A little help please hehe.I've been trying to statically link a d program with a dll that calls d code (http://www.digitalmars.com/d/dll.html) and i can't get it to work. I tried the example that comes with the compiler and works fine but it looks like it doesn't work with namespaces. For example replace the module namespace in the example from mydll to mydll.example. Have somebody get it to work this way?
Jul 30 2007
Karl Wrote:I can't understand the difference between a static and a dynamic dll. A little help please hehe.I've been trying to statically link a d program with a dll that calls d code (http://www.digitalmars.com/d/dll.html) and i can't get it to work. I tried the example that comes with the compiler and works fine but it looks like it doesn't work with namespaces. For example replace the module namespace in the example from mydll to mydll.example. Have somebody get it to work this way?
Jul 30 2007
Karl Wrote:Karl Wrote:I've got one more question related to this. I must import something in my program to access the dll, what should i import? the entire module's namespace? ie: mydll.example. or the name of the dll. I'm having a bit trouble here.I can't understand the difference between a static and a dynamic dll. A little help please hehe.I've been trying to statically link a d program with a dll that calls d code (http://www.digitalmars.com/d/dll.html) and i can't get it to work. I tried the example that comes with the compiler and works fine but it looks like it doesn't work with namespaces. For example replace the module namespace in the example from mydll to mydll.example. Have somebody get it to work this way?
Jul 30 2007
Karl wrote:Karl Wrote:http://www.digitalmars.com/ctg/implib.htmlKarl Wrote:I've got one more question related to this. I must import something in my program to access the dll, what should i import? the entire module's namespace? ie: mydll.example. or the name of the dll. I'm having a bit trouble here.I can't understand the difference between a static and a dynamic dll. A little help please hehe.I've been trying to statically link a d program with a dll that calls d code (http://www.digitalmars.com/d/dll.html) and i can't get it to work. I tried the example that comes with the compiler and works fine but it looks like it doesn't work with namespaces. For example replace the module namespace in the example from mydll to mydll.example. Have somebody get it to work this way?
Aug 01 2007