Connecting Tech Pros Worldwide Help | Site Map

Cannot activate incremental link - please help

Alex Shturm
Guest
 
Posts: n/a
#1: Nov 17 '05
Hi,

I am trying to activate incremental link using VC7 (.NET 2003) on a pretty big
project (executable size is more than 100Mb, and it gets linked from several
dozen of libraries and object files of different sizes - from less than 1Mb to
tens of MBs).

The problem is that option /incremental:yes does not have any effect on the
link time. I observe that the linker removes existing executable and re-links
it from scratch.

I looked in the Usenet groups and found a couple of relevant e-mail threads:
http://groups.google.com/groups?hl=e....phx.gbl#link1
http://groups.google.com/groups?q=in...phx.gbl&rnum=1

So, as suggested, I tried to add /test to the link line to get the reason for
link's behavior. And this is the reason I've got:
LINK : LNK6003: LINK options changed; performing full link

The funny thing is that link options DID NOT change. I just added an empty
line to one of source files and run make with the same makefile (we don't use
IDE).

Maybe the reason for link's confusion is a very long link line (14K chars) ?

Anybody @ Microsoft, could you please let me know what I can do to enable
incremental link?

Thank you,
Alex
Rudy Ray Moore
Guest
 
Posts: n/a
#2: Nov 17 '05

re: Cannot activate incremental link - please help


Incremental linking doesn't work when you change a library in your
workspace.

Only expect incremental linking when you change *only* a file in your
"startup project." A change in any other project will trigger a full link.

Linking is so much slower in VS7.1/.net/c++/2003 that you really notice
those full links!

Chris

"Alex Shturm" <news@shturm.com> wrote in message
news:KMgqc.68284$N62.58398@newssvr25.news.prodigy. com...[color=blue]
> Hi,
>
> I am trying to activate incremental link using VC7 (.NET 2003) on a pretty[/color]
big[color=blue]
> project (executable size is more than 100Mb, and it gets linked from[/color]
several[color=blue]
> dozen of libraries and object files of different sizes - from less than[/color]
1Mb to[color=blue]
> tens of MBs).
>
> The problem is that option /incremental:yes does not have any effect on[/color]
the[color=blue]
> link time. I observe that the linker removes existing executable and[/color]
re-links[color=blue]
> it from scratch.
>
> I looked in the Usenet groups and found a couple of relevant e-mail[/color]
threads:[color=blue]
>[/color]
http://groups.google.com/groups?hl=e....phx.gbl#link1[color=blue]
>[/color]
http://groups.google.com/groups?q=in...phx.gbl&rnum=1[color=blue]
>
> So, as suggested, I tried to add /test to the link line to get the reason[/color]
for[color=blue]
> link's behavior. And this is the reason I've got:
> LINK : LNK6003: LINK options changed; performing full link
>
> The funny thing is that link options DID NOT change. I just added an empty
> line to one of source files and run make with the same makefile (we don't[/color]
use[color=blue]
> IDE).
>
> Maybe the reason for link's confusion is a very long link line (14K chars)[/color]
?[color=blue]
>
> Anybody @ Microsoft, could you please let me know what I can do to enable
> incremental link?
>
> Thank you,
> Alex[/color]


Alex Shturm
Guest
 
Posts: n/a
#3: Nov 17 '05

re: Cannot activate incremental link - please help


Actually we don't use the concept of "project" (in VS terms). We have a
lot of source files that are compiled and linked using command-line runs
of the compiler and linker, using make and makefile.

Non-incremental link takes about 10 min on a 2.5 GHz 1Gb RAM machine,
which makes development pretty painful.

In my experiment I've tried to change just one source file and run the
same make/makefile, so only one object file was recompiled (no libraries
were changed). Still the linker did not do incremental linking... :(

Alex

Rudy Ray Moore wrote:
[color=blue]
>Incremental linking doesn't work when you change a library in your
>workspace.
>
>Only expect incremental linking when you change *only* a file in your
>"startup project." A change in any other project will trigger a full link.
>
>Linking is so much slower in VS7.1/.net/c++/2003 that you really notice
>those full links!
>
>Chris
>
>
>
>[/color]
Matt Dillard
Guest
 
Posts: n/a
#4: Nov 17 '05

re: Cannot activate incremental link - please help


A follow-up to this older post, for future reference:
I experienced the same problem with a project I'm working on -
incremental linking would never kick in despite having the project
setting turned on, even when I made a trivial change to a non-library
cpp file. This is using VC++ 7.1.

In the project I was working on, I had the linker set up to ignore the
default library nafxcwd.lib, and then I explicitly added it to the
libraries to link against list. This was to prevent some "new" and
"delete" symbol conflicts in MFC's library and the C runtime library
(see Microsoft's Knowledge Base article Q148652 for more info).

I discovered that this caused the linker to think that project settings
had changed every single time it went to link. By changing the linker
settings to not ignore the default library nafxcwd.lib, the project
still linked successfully, and this time incrementally, as well. Note
that this means I was not exactly following Microsoft's recommended
practice in their KB article, but it still links and runs okay -
perhaps that KB article is geared toward an older version of their
linker.

Matt

Alex Shturm wrote:[color=blue]
> Actually we don't use the concept of "project" (in VS terms). We have[/color]
a[color=blue]
> lot of source files that are compiled and linked using command-line[/color]
runs[color=blue]
> of the compiler and linker, using make and makefile.
>
> Non-incremental link takes about 10 min on a 2.5 GHz 1Gb RAM machine,[/color]
[color=blue]
> which makes development pretty painful.
>
> In my experiment I've tried to change just one source file and run[/color]
the[color=blue]
> same make/makefile, so only one object file was recompiled (no[/color]
libraries[color=blue]
> were changed). Still the linker did not do incremental linking... :(
>
> Alex
>
> Rudy Ray Moore wrote:
>[color=green]
> >Incremental linking doesn't work when you change a library in your
> >workspace.
> >
> >Only expect incremental linking when you change *only* a file in[/color][/color]
your[color=blue][color=green]
> >"startup project." A change in any other project will trigger a[/color][/color]
full link.[color=blue][color=green]
> >
> >Linking is so much slower in VS7.1/.net/c++/2003 that you really[/color][/color]
notice[color=blue][color=green]
> >those full links!
> >
> >Chris
> >
> >
> >
> >[/color][/color]

Closed Thread