This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]