Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

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

$
0
0
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?)

Viewing all articles
Browse latest Browse all 2113

Trending Articles