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

Bug#695064: conflicting declaration ‘typedef CARD8 BOOL’ in xmd.h



Hi Julien,

thanks for getting back to me about this issue!

I believe it is conflicting with FreeImage.h....here's the full stack trace:

jarrett@debian:~/projects/chisholmsoft/dark_horizon$ bash
compile_and_run.sh
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/Test.o -c -std=gnu++0x -I"../lwis/src/engine" src/Test.cpp
In file included from ../lwis/src/engine/IInputManager.h:11:0,
                 from ../lwis/src/engine/InputFactory.h:11,
                 from ../lwis/src/engine/LWISCommon.h:13,
                 from src/Test.h:14,
                 from src/Test.cpp:8:
../lwis/src/engine/IKeyboardDevice.h:319:36: warning: multi-character
character constant [-Wmultichar]
../lwis/src/engine/IKeyboardDevice.h:339:35: warning: multi-character
character constant [-Wmultichar]
In file included from ../lwis/src/engine/IInputManager.h:11:0,
                 from ../lwis/src/engine/InputFactory.h:11,
                 from ../lwis/src/engine/LWISCommon.h:13,
                 from src/Test.h:14,
                 from src/Test.cpp:8:
../lwis/src/engine/IKeyboardDevice.h: In constructor
‘lwis::engine::IKeyboardDevice::IKeyboardDevice()’:
../lwis/src/engine/IKeyboardDevice.h:319:36: warning: overflow in
implicit constant conversion [-Woverflow]
../lwis/src/engine/IKeyboardDevice.h:339:35: warning: overflow in
implicit constant conversion [-Woverflow]
g++ -o build/engine/IceGraphicsEngine.o -c -std=gnu++0x
-I"../lwis/src/engine" src/engine/IceGraphicsEngine.cpp
In file included from /usr/include/X11/extensions/xf86vmode.h:37:0,
                 from src/engine/../linux/LinuxGLWindow.h:31,
                 from src/engine/../linux/Common.h:11,
                 from src/engine/IceGraphicsEngine.h:27,
                 from src/engine/IceGraphicsEngine.cpp:8:
/usr/include/X11/Xmd.h:143:16: error: conflicting declaration ‘typedef
CARD8 BOOL’
In file included from
src/engine/../linux/../engine/../common/utilities/ImageLoader.h:15:0,
                 from src/engine/../linux/../engine/Texture.h:11,
                 from src/engine/../linux/../engine/TextureManager.h:20,
                 from src/engine/../linux/LinuxGLWindow.h:15,
                 from src/engine/../linux/Common.h:11,
                 from src/engine/IceGraphicsEngine.h:27,
                 from src/engine/IceGraphicsEngine.cpp:8:
/usr/include/FreeImage.h:139:17: error: ‘BOOL’ has a previous
declaration as ‘typedef int32_t BOOL’
scons: *** [build/engine/IceGraphicsEngine.o] Error 1
scons: building terminated because of errors.
Script halted due to error(s)!


cheers

jarrett

On 03/12/12 04:25 PM, Julien Cristau wrote:
> Control: reassign -1 x11proto-core-dev
> Control: tag -1 moreinfo
>
> On Mon, Dec  3, 2012 at 13:24:55 -0500, Jarrett Chisholm wrote:
>
>> I'm building a c++ application, which includes xf86vmode.h header.
>>
>>
>> I think this is part of the X11 library header files.  Here is the dpkg output:
> Xmd.h is not, but close enough.  It's part of the X11 protocol headers.
>
>> jarrett@debian:~/$ dpkg --list libx11-dev
>> Desired=Unknown/Install/Remove/Purge/Hold
>> | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
>> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
>> ||/ Name                                Version                Architecture           Description
>> +++-===================================-======================-======================-============================================================================
>> ii  libx11-dev:amd64                    2:1.5.0-1              
>> amd64                  X11 client-side library (development headers)
>>
>>
>> When I compile with the g++ flag '-std=gnu++0x', I get the following error:
>>
>> In file included from /usr/include/X11/extensions/xf86vmode.h:37:0,
>>                  from src/engine/../linux/LinuxGLWindow.h:31,
>>                  from src/engine/../linux/Common.h:11,
>>                  from src/engine/IceGraphicsEngine.h:27,
>>                  from src/engine/IceGraphicsEngine.cpp:8:
>> /usr/include/X11/Xmd.h:143:16: error: conflicting declaration ‘typedef CARD8 BOOL’
>>
>>
>> My guess is the new c++ features has a conflict or something here...
>>
>> If I remove line 143 from Xmd.h, I no longer see this error.
>>
> What's the other declaration it conflicts with?
>
> Cheers,
> Julien


Reply to: