Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 761437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:50:15+00:00 2026-05-14T15:50:15+00:00

During compilation and linking, what is use of .exp? What is the difference between

  • 0

During compilation and linking, what is use of .exp? What is the difference between .lib and .dll? I know that .lib will be used, while linking and .dll will be used when running the program. But what exactly is the difference between .lib and .dll?

Does .lib file not contain the code for the functions coming from .dll files?
What is the need for using two separate files?

Please clarify.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:50:15+00:00Added an answer on May 14, 2026 at 3:50 pm

    In the case of an import library for a DLL, the .lib file does not contain any actual code at all. It basically contains just a list of the functions in the associated DLL — enough for the linker to embed a reference to that DLL into something linked with the library, but not much else.

    A .exp file is an export file — basically just about the same as a .lib file. It’s used (at least primarily) when you have a circular dependency. For example, assume you have a DLL that acts as a plug-in for an executable. The executable supplies some exported functions for use by plug-in DLLs, but also needs to be able to call some functions in the plug-ins as well (e.g. to load and initialize a plug-in).

    The DLL won’t link until the executable is built to provide a .lib file — but the executable won’t link until the DLL is built to provide a .lib file. To break the dependency, you run the linker against the executable, which fails (because it can’t find a .lib file for the DLL), but will produce a .exp file. You then link the DLL against the .exp file for the executable. You can then re-run link to produce the executable, using the .lib file for the DLL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i tried to look up whether virtual function determine during compilation or while running.
sometimes i see that certain projects write something to the output during compilation. how
I am exporting a C++ class to Python and I noticed that during compilation,
I am getting some linking errors during the compilation of C project in Microsoft
I'm including a rather large JAR file during compilation that I'm generating using Altova
In a project, during the compilation, the resource-linking process fails with this error: [DCC
I would like to create a static menu. I mean during compilation I'll know
During compilation process many errors are thrown on the screen. To start resolving them
I'm getting the error fatal error C9999: *** exception during compilation *** Whenever I
Is there an environment variable for GCC/G++ to look for .h files during compilation?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.