[Scummvm-devel] remove macro conflict in system headers

Johannes Schickel lordhoto at gmail.com
Thu Oct 31 14:21:56 CET 2013

On Thu, Oct 31, 2013 at 1:55 PM, Willem Jan Palenstijn <wjp at usecode.org>wrote:

> On Thu, Oct 31, 2013 at 12:35:28AM +0400, Икар wrote:
> >
> > When I building Tsage engine for symbian with GCCE 4.4.1 I got many
> erros "macro `remove' used without args" because compilers think what
> function :
> > virtual void remove()=0
> > and his virtual inheritance comes from macro definition
> > #define remove(x) unlink(x)
> > This define placed in sys/unistd.h
> >
> >  I try to  use '#undef remove' in core.h but it doesn't work.
> What do you mean by "doesn't work"?
> We use remove() in more places than just core.h, so I'm not sure what you
> tried or how it doesn't work...

I think he talks about
was reverted later. One possibly issue here could've been that you
undefine such macros by simple "#undef remove" instead of "#undef
remove(x)". Other issues might include core.h wasn't included in the
offending files, core.h was included first and then #undef remove was
before the actual #define.

// Johannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20131031/3d760ed8/attachment.html>

More information about the Scummvm-devel mailing list