Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. MSVC2010 rebuilds every time, deletes *.obj on "DLL-link-fail"
Forum Updated to NodeBB v4.3 + New Features

MSVC2010 rebuilds every time, deletes *.obj on "DLL-link-fail"

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 1.7k 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.
  • C Offline
    C Offline
    charleyb
    wrote on last edited by
    #1

    I use QMake to gen *.vcproj (from *.pro) to create DLLs that expose C++ classes to QML (Qt5.0.1/MSVC2010). The DLLs work.

    However, I have two problems (they might be related):

    When I "build", it ALWAYS recompiles everything in the DLL. (It's never "up-to-date".)

    If I get a "link-fail" (for example, some input lib doesn't have a needed-function defined), MSVC will delete all the .*.obj and other intermediate files, requiring the next build to (unnecessarily) rebuild those intermediates. (The "link-success" will LEAVE the intermediate *.obj files, but the next build will force them to be regenerated anyway.) This means I can never do a "Project Only => Link Only" when I fix an "input-static-lib".

    Both of these seem weird. And, they make me sad.

    Note that since I "regenerate" the .vcproj each time, there are no "files-in-the-project" that do not exist on disk (which others observe as a cause to always-trigger-rebuild).

    I've already tried the "silly-stuff" like re-installing service packs, clean builds, manually removing all intermediates/artifacts, reboot, etc.

    From web searches (lots of reading for weeks to get around this), this might be related to:

    • Each DLL has its own directory for its "intermedate-OBJs", but they all write to the same (shared-debug)-"output" folder for their .dll/.lib. (That should be fine, right?)

    Failing a "proper-fix" (where MSVC realizes that things are up-to-date), is there a work-around where I can suppress the delete-intermediate-files so I can later force a mere "re-link", when I know that things should be fine? At present, I can't "Project Only => Link Only" because the intermediates get deleted. (How to stop MSVC from deleting the .OBJ files?)

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tzander
      wrote on last edited by
      #2

      Did you say you run qmake on every build to re-generate the project file?
      That might be the reason this is happening. Only re-generate it when a file gets added or something else that causes your .pro file to change.

      Another idea is that maybe some files (like your .pro) have a modification date in the future.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        charleyb
        wrote on last edited by
        #3

        @Thomas, I re-run qmake when I add/remove files (I manually update the .pro, then rerun qmake). I only mentioned that to clarify that there are no "files-in-project" that do not exist (because qmake is good about warning you if you reference a file that does not exist).

        Modification date in the future ... good idea, I checked, it's not that. <sigh>

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tzander
          wrote on last edited by
          #4

          maybe give QtCreator a try? ;)

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved