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. Project building .exp and .lib files for no apparent reason

Project building .exp and .lib files for no apparent reason

Scheduled Pinned Locked Moved C / C++ / MFC
questioncssjson
3 Posts 2 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.
  • I Offline
    I Offline
    IGx89
    wrote on last edited by
    #1

    A program I'm working on has been linking incredibly slowly. It'll show "Linking..." for less than half of the linking time, and then the rest of the time is spent "Creating library [programname].lib and object [programname].exp". The thing is, the program is an executable and thus shouldn't be making those files (which are only a few kilobytes in size), right? I can't find a reference to those files anywhere in the solution or project files, and none of the compiler/linker settings I've enabled/disabled have affected it. How do I stop those files from being built?

    J 1 Reply Last reply
    0
    • I IGx89

      A program I'm working on has been linking incredibly slowly. It'll show "Linking..." for less than half of the linking time, and then the rest of the time is spent "Creating library [programname].lib and object [programname].exp". The thing is, the program is an executable and thus shouldn't be making those files (which are only a few kilobytes in size), right? I can't find a reference to those files anywhere in the solution or project files, and none of the compiler/linker settings I've enabled/disabled have affected it. How do I stop those files from being built?

      J Offline
      J Offline
      Johan Rosengren
      wrote on last edited by
      #2

      You stop them by never link your app :-) Jokes aside, if you export files fro your application - for example if you have a callback function that a DLL will use, those two files must be created to make it possible to mutually link the app and the DLL. So, if you get them, you most likely need them. There are lots of info on MSDN if you search for lib AND exp, for example this one: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_lib_output_files.asp[^].

      I 1 Reply Last reply
      0
      • J Johan Rosengren

        You stop them by never link your app :-) Jokes aside, if you export files fro your application - for example if you have a callback function that a DLL will use, those two files must be created to make it possible to mutually link the app and the DLL. So, if you get them, you most likely need them. There are lots of info on MSDN if you search for lib AND exp, for example this one: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_lib_output_files.asp[^].

        I Offline
        I Offline
        IGx89
        wrote on last edited by
        #3

        I actually figured out what was causing the problem: the project was including a header file from a DLL project that had dllexport's that weren't being #define'd out. Once I #define'd them out, the .lib and .exp files stopped being generated and links (especially incremental) were noticably faster :).

        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