-
*.dll vs. *.lib
I'm making an AI library with functions for decoding information by finding patterns. I have software to make both. DLL's have more features, but I don't think I need those features, I have more experience with *.libs (I wouldn't have to learn anything new - with a DLL I would) so they average out to be pretty much even. What's your opinion on it?
-
I hate DLLs. IMO they're pointless with today's technology. I'll admit there are uses for them, but for the most part you should stick to LIBs.
If you use LIBs, then your poor end user will never have to worry about whether or not they have the DLLs your program needs. And if they decide to uninstall your program, they won't have to worry whether or not they can remove the DLL that your program used.
Just my opinons, though.
-
The problem with libs is that they limit the user to a specific compiler. Where as DLL are more flexible.
If you intend that all your customers must use VC++ version 6, use a lib. Otherwise use a DLL. Perhaps you could offer both. Alternatively, offer some other wizz-bang technology (such as COM or VCL), but at the end of the day they usually drill down to a DLL or lib. (Microsoft usually try to disguise this by giving their DLL stupid extensions, such as OCX, but they're really DLLs at the end of the day).
Out of interest, what kind of AI library are you writing?
-
Uh....... I'm not sure what you're asking but it's a library for decoding but it uses a neural network - hence the AI.
Are a static library and an object-module library the same thing? If not, what are the differences, and does that solve the compiler sepcificness problem?
-
> Are a static library and an object-module library the same thing?
Static library is a lib, while a dynamic library is a DLL. An object-module library sounds like a proprietry term involving object orientation.
All I can add to the DLL v lib question is that I have written DLLs which can be used in virtually any [Windows 32 bit] compiler, i.e.
Borland C++ Builder
Borland C++
MS VC
Borland Delphi (not even C++)
etc.
(I assume we are talking Windows)
I don't believe you could do this with a lib, although building cross-compatible DLLs isn't easy.
You could export your interface as COM objects, but this (as I've said) boils down to using dynamic libraries, although it will take care of many of the compatibility issues for you. If you want objects, then you need to think about how you are going to export them right from the start.
Personally, I would start by asking whether you intend to have an object oriented interface or a function interface. If it's a function interface, I would consider a DLL.
-
Object module libraries, are just *.obj files, or modules, added to the library. They're made with TLIB.exe, from Borland TC++ for DOS. I don't think there are strict limitations to what's in the code, but I think they intended us to put on class and int's inline code in one, and it's outline code in another, and do the same for everyclass. I just make one big source file and add it. They DO have an lib extension.