Re: fatal error LNK1179

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Carl Daniel [VC++ MVP] (cpdaniel_remove_this_and_nospam_at_mvps.org.nospam)
Date: 02/27/04


Date: Fri, 27 Feb 2004 08:34:26 -0800

Hendrik Schober wrote:
> Carl Daniel [VC++ MVP]
> <cpdaniel_remove_this_and_nospam@mvps.org.nospam> wrote:
>> [...]
>> May you should try re-writing the code in question using a radically
>> different style.
>
> No way. This underlies a fairly important
> part of the app. Re-designing this means
> another three weeks and we are days from
> a deadline.

All the more reason to start taking definitive action. Thrashing on an
obscure tool-chain bug has a low probability of success in any timeframe.

>
>> It seems likely that you're encountering a fairly
>> obscure bug in which the compiler emits two different bodies for the
>> a single template instantiation.
>
>
> I don't understand this.
> I suspected that it would emit two equal
> bodies for different instances? But you
> say, it's the other way around???

I think so. I've encountered a bug before that resulted in multiple
instantiations of a template function that were different (but have the same
name). IIUC, the linker matches up like-named COMDATs and discards all but
one - but it does check to verify that they do indeed contain the same
content.

>
>>> And, of course, if I check this in, the build
>>> might fail, too. So I'm sitting on this file
>>> and don't know what to do!
>>
>> Call Product Support.
>
> It would take days (at least!) to sort
> this out through support channels.

If you never start the process, it'll never happen. IMO it makes sense as a
contingency plan to get things rolling with PSS.

> I
> am after an idea what to do today. The
> problem is hard to reproduce, since
> changing the source file back and forth
> makes it (dis-)appear.
> This puzzles me the most. Is there any
> files (besides PCH's which aren't used
> here) where the compiler saves any
> state info between compiles???
>

Not that I know of, but there is the .ilk file where the linker saves
information if you have /incremental:yes in your link options. Normally
Release builds don't do incremental links, but that might be something to
look into.

-cd



Relevant Pages

  • Re: Text box throws an Error 7 Out of Memory with less than 27K in it!
    ... I'd have to agree with Bob here, ... >> those exact numbers and then concatenates that many more, ... I used to work supercomputer compiler support at CDC. ... > My favorite such bug at CDC was a benchmark that ran instantaneously. ...
    (microsoft.public.vb.enterprise)
  • Re: Bug in latest IAR MSP430 compiler optimization???
    ... It has been assigned bug id EW20095, and it will be fixed in the ... The tests compiler companies do are quite extensive. ... register allocation when combined with post-incs and rollup. ... IAR use an industry standard test suite like this (that you don't ...
    (comp.arch.embedded)
  • Re: Salford compiler: Assigning a value to a constant expression is invalid
    ... a bug, it is not usually wise, I think, to assume that it's a compiler bug. ... -|> I'd suggest submitting a self-contained source code file to Salford Support. ... So all I had to do in that case was send the routine and ...
    (comp.lang.fortran)
  • Re: Another computer algebra system : smib
    ... Certainly sometimes a bug is discovered only after a program is ported to a new environment -- a bug that existed in the old environment too, but just had not been exercised. ... Spending time porting a program is ... If the code is a command line drive program, then there should be few differences between for platform A and code for platform B. If one uses portable thread libraries, then if code breaks on platform B, but not on A, I would certainly think it is worth while spending time on platform B to find the problem, as it is highly likely to be a logical error in the program. ... The fact this is new code, I would not release it with over 1600 warnings messages from the compiler. ...
    (sci.math.symbolic)
  • Re: timeouts
    ... If I report a bug in the GCC C compiler, for example, then I can ... Stephen> a support contract for it. ... option when exclusively developing open source software. ...
    (comp.lang.ada)