[Live-devel] Boolean.hh and mshtml.h : 'False' : redefinition; previous definition was 'enumerator' error

Jeff Shanab jshanab at smartwire.com
Mon Jun 6 06:03:05 PDT 2011


I will answer my own question. There is really no good way around this. What Ended up doing was modifying Boolean.hh

From: live-devel-bounces at ns.live555.com [mailto:live-devel-bounces at ns.live555.com] On Behalf Of Jeff Shanab
Sent: Saturday, June 04, 2011 6:34 PM
To: live-devel at lists.live555.com
Subject: [Live-devel] Boolean.hh and mshtml.h : 'False' : redefinition; previous definition was 'enumerator' error

I have a browser plugin project that uses live555 and did some re-arranging and have managed to break my build, but I can't see my way out of it.

I am building in Visual studio 2010 pro and have been for 6 months.

The conflict is because the project uses mshtml.h inside of the activex part of the framework. It defines an enumeration with an element that is "False"
Boolean.hh also tries to define a non-enumeration that is named "False"

Here is the error: (I get one on redefinition of 'True' also)
rtsp\usageenvironment\include\boolean.hh(26): error C2365: 'False' : redefinition; previous definition was 'enumerator'


I do not know how I had it building for the last 6 months. How can I get these to be in different scopes, there are no namespaces in the MS or the live555 headers.



#ifndef _BOOLEAN_HH
#define _BOOLEAN_HH




#ifdef   __BORLANDC__
#define Boolean bool
#define False false
#define True true
#else


                typedef unsigned Boolean;
#ifndef __MSHTML_LIBRARY_DEFINED__
                #ifndef False
                                const Boolean False = 0;
                #endif
                #ifndef True
                                const Boolean True = 1;
                #endif

#endif
#endif

#endif


And then early in my project ...
//include this to force the order and help modified Boolean.hh to work.
#include <MsHTML.h>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20110606/7238e1d3/attachment.html>


More information about the live-devel mailing list