View Poll Results: Which library type do you prefer?

8. You may not vote on this poll
  • Dynamic Link Library (DLL/*.dll)

    2 25.00%
  • Object Module/Static Library (LIB/*.lib)

    6 75.00%

Thread: *.dll vs. *.lib

  1. #1
    Super Moderator
    Join Date
    Sep 2001

    *.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?

  2. #2
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    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.

  3. #3
    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?

  4. #4
    Super Moderator
    Join Date
    Sep 2001
    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?

  5. #5
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    > 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++)


    (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.

  6. #6
    Super Moderator
    Join Date
    Sep 2001
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. possible to link and run with .lib file without .dll file?
    By George2 in forum Windows Programming
    Replies: 1
    Last Post: 05-25-2006, 09:05 PM
  2. Create .dll with Studio.NET in C++
    By vthokienj in forum C++ Programming
    Replies: 2
    Last Post: 02-09-2006, 07:21 AM
  3. Making a .dll
    By ninjaturtle[k9] in forum C++ Programming
    Replies: 7
    Last Post: 07-25-2004, 11:56 PM
  4. Problem with a .dll file
    By GaPe in forum Windows Programming
    Replies: 2
    Last Post: 10-29-2003, 01:20 PM
  5. How can I edit .dll files?
    By leskitten in forum C++ Programming
    Replies: 9
    Last Post: 07-29-2002, 03:16 PM