Brian Dessent wrote: > Jonathan Lennox wrote: > > When optimization is turned on, and thus inline functions are actually > > inlined, everything works fine. However, on Cygwin, when functions are not > > inlined, I get link-time errors: the weak symbol emitted for the C++ code > > conflicts with the backup definition. (This problem does not occur on > > ELF-based systems, tested on GNU/Linux (RHEL 4) and Solaris 8.) > > > > Is this a gcc bug? > No, I think it's just a fact of life that PE/COFF has no concept of weak > symbol visibility in the way that ELF does. You may be able to find > more details on this in the binutils mailing list archives, but I think > it's a fundamental restriction of Windows. There might be a different > kind of workaround involving dllexport-type trickery, but I don't know. How does collect2 link multiply-defined C++ symbols on PE/COFF? Is there a way to "manually" mark symbols in the same way from C code? -- Jonathan Lennox lennox at cs dot columbia dot edu