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. VS.Net2k3 prob: links, but doesn't create .lib

VS.Net2k3 prob: links, but doesn't create .lib

Scheduled Pinned Locked Moved C / C++ / MFC
announcementcsharpc++visual-studiodebugging
4 Posts 3 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.
  • S Offline
    S Offline
    Steve The Plant
    wrote on last edited by
    #1

    Hi, I have a weird linking error happening in my C++ DLL project. In VS.Net 2003, when I compile my dll in release mode, I get the normal "linking... Creating library c:\some_path\blah.lib", but if I do the same in debug, I get "linking..." but the .lib doesn't get created/updated. Other than that, it seems to compile file. No errors get generated. I've checked the settings between both modes, and I can't see anything different between them. If I do a "rebuild all" it does update the .lib, but not if I just modify a file and compile the project. I don't want to "rebuild all" everytime I want to test a change. Any ideas? Thanks! DJCC

    D 1 Reply Last reply
    0
    • S Steve The Plant

      Hi, I have a weird linking error happening in my C++ DLL project. In VS.Net 2003, when I compile my dll in release mode, I get the normal "linking... Creating library c:\some_path\blah.lib", but if I do the same in debug, I get "linking..." but the .lib doesn't get created/updated. Other than that, it seems to compile file. No errors get generated. I've checked the settings between both modes, and I can't see anything different between them. If I do a "rebuild all" it does update the .lib, but not if I just modify a file and compile the project. I don't want to "rebuild all" everytime I want to test a change. Any ideas? Thanks! DJCC

      D Offline
      D Offline
      Dean Goodman
      wrote on last edited by
      #2

      I've noticed the same thing too. This is just a guess, but I think it's probably fine if the .lib file isn't updated. Basically the .lib file provides the interface for the DLL that you will link against in some other program. So, if you just update the implementation (rather than the function signatures) there is no reason to update the lib file, because the interface to the DLL remains the same. Again, I'm not 100% sure about that so someone correct me if I'm wrong, but I think you'll be fine linking against the .lib file even if it's not updated. --Dean

      S 1 Reply Last reply
      0
      • D Dean Goodman

        I've noticed the same thing too. This is just a guess, but I think it's probably fine if the .lib file isn't updated. Basically the .lib file provides the interface for the DLL that you will link against in some other program. So, if you just update the implementation (rather than the function signatures) there is no reason to update the lib file, because the interface to the DLL remains the same. Again, I'm not 100% sure about that so someone correct me if I'm wrong, but I think you'll be fine linking against the .lib file even if it's not updated. --Dean

        S Offline
        S Offline
        Steve The Plant
        wrote on last edited by
        #3

        The real problem I have with this is that when I start changing classes around (adding/removing methods), whenever I stop to and continue from a breakpoint, I get "runtime check failure #0" errors. If I rebuild, which updates the .lib file, I don't get these errors. DJCC

        A 1 Reply Last reply
        0
        • S Steve The Plant

          The real problem I have with this is that when I start changing classes around (adding/removing methods), whenever I stop to and continue from a breakpoint, I get "runtime check failure #0" errors. If I rebuild, which updates the .lib file, I don't get these errors. DJCC

          A Offline
          A Offline
          Antti Keskinen
          wrote on last edited by
          #4

          See the project settings that you have the 'Import Library' option set under 'Linker->Advanced'. This controls the creation of the .lib file. Also, you must have a module definition file in your project. If this file doesn't exist, then the compiler/linker creates the export library only if you have dllexport-declarations inside the code files. This might result in incorrect behaviour if those functions which you add to the classes are not exported. The module definition file is not required to export any symbols. All that needs to be there is a line 'LIBRARY your_dll_name_here'. -Antti Keskinen ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible.

          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