Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. DLL export library ( .lib file)

DLL export library ( .lib file)

Scheduled Pinned Locked Moved C / C++ / MFC
c++announcementdebuggingquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    act_x
    wrote on last edited by
    #1

    I have a DLL project being developed in Visual C++ 6 . Now the project has two configurations release and debug. As part of the output a .lib is also created which is needed by the application trying to use the library. I need to distribute files related to this DLL to the end user . Now does it matter for the .lib file ( for linkage) if this is debug or release . In other words will it suffice if I provide only the release .lib file even if the debug version of the DLL is going to be used ? Does it matter if you link with debug or release .lib fi

    Engineering is the effort !

    J D V 3 Replies Last reply
    0
    • A act_x

      I have a DLL project being developed in Visual C++ 6 . Now the project has two configurations release and debug. As part of the output a .lib is also created which is needed by the application trying to use the library. I need to distribute files related to this DLL to the end user . Now does it matter for the .lib file ( for linkage) if this is debug or release . In other words will it suffice if I provide only the release .lib file even if the debug version of the DLL is going to be used ? Does it matter if you link with debug or release .lib fi

      Engineering is the effort !

      J Offline
      J Offline
      Jeremy Falcon
      wrote on last edited by
      #2

      act_x wrote:

      Now does it matter for the .lib file ( for linkage) if this is debug or release .

      Yes. Use the debug version of the .lib for the debug .dll, and the same goes for the release versions. Don't mix and match the two unless you want some strange errors creeping up.

      Jeremy Falcon Oatmeal, It's What's for Dinner.[^]

      1 Reply Last reply
      0
      • A act_x

        I have a DLL project being developed in Visual C++ 6 . Now the project has two configurations release and debug. As part of the output a .lib is also created which is needed by the application trying to use the library. I need to distribute files related to this DLL to the end user . Now does it matter for the .lib file ( for linkage) if this is debug or release . In other words will it suffice if I provide only the release .lib file even if the debug version of the DLL is going to be used ? Does it matter if you link with debug or release .lib fi

        Engineering is the effort !

        D Offline
        D Offline
        DevMentor org
        wrote on last edited by
        #3

        Also you should get into the habit of appending (post fixing) a letter 'd' at the end of the debug lib filename to distinguish it from the release version. i.e

        release name: utils.lib
        debug name: utilsd.lib

        --- Yours Truly, The One and Only! web: devmentor.org Design, Code, Test, Debug

        1 Reply Last reply
        0
        • A act_x

          I have a DLL project being developed in Visual C++ 6 . Now the project has two configurations release and debug. As part of the output a .lib is also created which is needed by the application trying to use the library. I need to distribute files related to this DLL to the end user . Now does it matter for the .lib file ( for linkage) if this is debug or release . In other words will it suffice if I provide only the release .lib file even if the debug version of the DLL is going to be used ? Does it matter if you link with debug or release .lib fi

          Engineering is the effort !

          V Offline
          V Offline
          VonHagNDaz
          wrote on last edited by
          #4

          also, in the properties tab, there is a macro $(ConfigurationName) it will associate debug files for debug build and release files for release. checkout the different macros, they can help a lot with different configurations or different file paths for different configurations.

          [Insert Witty Sig Here]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups