Re: build problem: conflicting definitions of BOOL

Irene Vatton <[email protected]>
Newsgroups gmane.comp.web.amaya.devel
Organization INRIA
Message-ID <[email protected]>
On Wednesday 15 February 2006 21:17, eponymous alias wrote:
> I'm trying to make Amaya available to the great masses using Solaris 10.
>
> Ignoring for a moment various patches I've had to make (mostly involving
> the selection of compilers and their options) that will eventually be
> reported separately, the build gets here:
>
> cd /tmp/amaya/Amaya/Solaris/thotlib
> g++ -O2 -D_UNIX  -D_GL -D_WX  -DHAVE_CONFIG_H -I.. -I../../amaya/xpm
> -I../../thotlib/include -I../../thotlib/internals/var
> -I../../thotlib/internals/h -I../../thotlib/internals/f
> -I/tmp/amaya/wxWidgets/src/png -I/tmp/amaya/wxWidgets/src/jpeg
> -I/tmp/amaya/wxWidgets/src/tiff
> -I/tmp/amaya/Amaya/Solaris/wxWidgets_RELEASE/lib/wx/include/gtk2-unicode-re
>lease-static-2.6 -I/tmp/amaya/wxWidgets/include
> -I/tmp/amaya/wxWidgets/contrib/include -DGTK_NO_CHECK_CASTS -D__WXGTK__
> -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/usr/sfw/include/freetype2
> -I/usr/sfw/include  -c
> .../../thotlib/base/AmayaApp.cpp -o base/AmayaApp.o
>
> and this yields:
>
> In file included from /usr/include/GL/glx.h:30,
>                  from /tmp/amaya/wxWidgets/include/wx/gtk/glcanvas.h:24,
>                  from /tmp/amaya/wxWidgets/include/wx/glcanvas.h:26,
>                  from ../../thotlib/include/AmayaApp.h:12,
>                  from ../../thotlib/base/AmayaApp.cpp:27:
> /usr/include/X11/Xmd.h:159: error: conflicting declaration 'typedef CARD8
> BOOL' .../../thotlib/include/thot_sys.h:221: error: 'BOOL' has a previous
> declaration as `typedef ThotBool BOOL'
> /usr/include/X11/Xmd.h:159: error: declaration of `typedef CARD8 BOOL'
> .../../thotlib/include/thot_sys.h:221: error: conflicts with previous
> declaration `typedef ThotBool BOOL'
> /usr/include/X11/Xmd.h:159: error: declaration of `typedef CARD8 BOOL'
> .../../thotlib/include/thot_sys.h:221: error: conflicts with previous
> declaration `typedef ThotBool BOOL'
>
> Clearly there is a conflict between these sources of Truth and Falsity
> (BOOL). I need advice from someone familiar with thotlib on how to cleanly
> (and portably) rework the code in thot_sys.h so it doesn't conflict with
> Xmd.h but still yields a workable compilation.

I suggest this patch in Amaya/thotlib/include/thot_sys.h (line 211)
+#ifndef BOOL
  typedef ThotBool BOOL;
+#endif

>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com

-- 
     Irène.
-----
Irène Vatton                     INRIA Rhône-Alpes
INRIA                               ZIRST
e-mail: [email protected]       655 avenue de l'Europe
Tel.: +33 4 76 61 53 61             Montbonnot
Fax:  +33 4 76 61 52 07             38334 Saint Ismier Cedex - France
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.