Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » [BUG] TheIDE prevents using MSC Incremental link
[BUG] TheIDE prevents using MSC Incremental link [message #39181] Sun, 24 February 2013 12:59 Go to next message
Shire is currently offline  Shire
Messages: 41
Registered: September 2006
Location: Russia, Yamal peninsula
Member
Incremental linking is very good think to accelerate debug builds and enabled by default in Microsoft compilers.
But TheIDE prevents using this technology.

LINK : app.exe not found or not built by the last incremental link; performing full link

Why?
Quote:

LINK performs a full link if any of the following situations occur:
  • The incremental status (.ilk) file is missing. (LINK creates a new .ilk file in preparation for subsequent incremental linking.)
  • There is no write permission for the .ilk file. (LINK ignores the .ilk file and links nonincrementally.)
  • The .exe or .dll output file is missing.
  • The timestamp of the .ilk, .exe, or .dll is changed.
  • A LINK option is changed. Most LINK options, when changed between builds, cause a full link.
  • An object (.obj) file is added or omitted.
  • An object that was compiled with the /Yu /Z7 option is changed.


uppsrc/ide/Builders/Build.cpp
bool MakeBuild::Build
<...>
// Set the time of target to start-time, so that if any file changes during
// compilation, it is recompiled during next build
SetFileTime(target, start_time);

Changing target file timestamp is bad practice. Changing sources during compilation too Smile . Hope you avoid this.

Also there is fully useless invoking of manifest tool:
app.exe.manifest : general error c1010070: Failed to load and parse the manifest.

uppsrc/ide/Builders/MscBuilder.icpp
bool MscBuilder::BuildPackage
<...>
if((IsMsc86() || IsMsc64()) && is_shared) {
  String mt("mt -nologo -manifest ");
  mt << GetHostPathQ(product + ".manifest") << " -outputresource:" << GetHostPathQ(product) << ";2";
    Execute(mt);
}

bool MscBuilder::Link
<...>
if((IsMsc86() || IsMsc64()) && HasFlag("SO")) {
  String mt("mt -nologo -manifest ");
   mt << GetHostPathQ(target + ".manifest") << " -outputresource:" << GetHostPathQ(target)
      << (HasFlag("DLL") ? ";2" : ";1");
   Execute(mt);
}

You can avoid error message by putting manually manifest file near resulting binary. But modern linker automatically (and by default) generates it for resulting executable.
If you want embed custom manifest, you can do it by linker options (/MANIFEST) in Package organizer.
I put these small modifications with proper support of precompiled headers here.
Re: [BUG] TheIDE prevents using MSC Incremental link [message #39537 is a reply to message #39181] Tue, 26 March 2013 16:45 Go to previous message
Alboni is currently offline  Alboni
Messages: 182
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
I noticed this too. You build. And then when you hit run it links again for no reason.
I suppose changing the timestamp serves a purpose here, but to avoid unnessecary relinking, all .obj and .lib files produced during compilation should have that same timestamp.
Previous Topic: First compilling under Linux; /usr/bin/ld: cannot find
Next Topic: [SOLVED] Compile on 64 bits on linux
Goto Forum:
  


Current Time: Wed Nov 20 06:07:11 CET 2019

Total time taken to generate the page: 0.01025 seconds