This is the mail archive of the gcc@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]

Re: 'extern "C" { ...}' and 'ANSI C++ forbids ...'


Konstantin Baumann wrote:

> mal@bewoner.dma.be wrote:
>
> >  > >  > I think this an error, because the <X11/Xlib.h>-header-file is included in
> >  > >  > "C"-mode not in "C++"-mode!
> >  > >  >
> >  > >
> >  > > No. extern "C" just influences the linkage. The included stuff must be
> >  > > correct C++. just add int at the right place.
> >  >
> >  > But the included files are standard-system-header-files (e.g. for X11) I am not
> >  > allowed to change!
> >
> > Make a copy and make sure that gets found before the system header
> > file.
>
> That would work for ME.
> But we are developing on multiple platforms, which would mean forcing every
> developer to do the same; which is not acceptable!

Use -fpermissive. This is a FAQ: http://egcs.cygnus.com/faq.html#X11R6

--
Branko Čibej                 <branko.cibej@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
voice: (+386 61) 186 53 49   fax: (+386 61) 186 52 70



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]