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 messageGo to next message
Alboni is currently offline  Alboni
Messages: 196
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.
Re: [BUG] TheIDE prevents using MSC Incremental link [message #53369 is a reply to message #39537] Tue, 31 March 2020 15:14 Go to previous message
aftershock is currently offline  aftershock
Messages: 141
Registered: May 2008
Experienced Member
The bug still exists.
the solution would be I think to change the timestamp of the sourcefile instead of object files and executable if
the timestamp of the source file is after the start time

I lost a lot of time because incremental linking did not work.
a REAALY a lot of time.


[Updated on: Tue, 31 March 2020 15:14]

Report message to a moderator

Previous Topic: GTK3 - Image CairoImage(int cx, ...)
Next Topic: How to link libeay32, libssl32 and ssleay32 statically in Windows?
Goto Forum:
  


Current Time: Thu Jul 09 03:20:41 CEST 2020

Total time taken to generate the page: 0.01031 seconds