Re: Mixing GNU C89 extern inline and C++ inline on Cygwin?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Brian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux