RE: [EDK DEV] HiiFont.h Redefinition errors

Subject: RE: [EDK DEV] HiiFont.h Redefinition errors

From: yeting <ting.ye@intel.com>

To: dev@edk.tianocore.org

Date: 2009-03-02 18:57:10

Currently there are two versions of HII-related protocols, one is defined in Framework 0.9 specification while the other is defined in UEFI 2.1 specification. There are same definitions in EfiInternalFormRepresentation.h (header file of Framework 0.9 HII) and EfiHii.h (header file of UEFI 2.1 HII) thus you will receive the compile errors when you try to use these two versions of HII implementations at the same time. 

You could use EFI_HII_FONT_PROTOCOL only when you are using UEFI 2.1 HII since it is introduced by UEFI 2.1 specification. 

-----Original Message-----
From: Raviprasad SN [mailto:raviprasadsn@gmail.com] 
Sent: Friday, February 27, 2009 4:31 PM
To: dev@edk.tianocore.org
Subject: [EDK DEV] HiiFont.h Redefinition errors

Hi,
 I'm working on font related things in DUET platform. When I include HiiFont.h in my C file to refer to EFI_HII_FONT_PROTOCOL, It throws up compilation errors. 
The errors are related to redefinition of the same variable or structures in multiple files. Below is a snapshot of errors. I dont get the same errors when I compile it for NT32 platform. Please let me know how to take care of this.

Thanks,
-Ravi
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1112) : error C2371: 'EFI_IFR_NOT
' : redefinition; different basic types
        c:\New-Edk\Edk\Foundation\Framework\Include\EfiInternalFormRepresentatio
n.h(343) : see declaration of 'EFI_IFR_NOT'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1153) : error C2371: 'EFI_IFR_AND
' : redefinition; different basic types
        c:\New-Edk\Edk\Foundation\Framework\Include\EfiInternalFormRepresentatio
n.h(335) : see declaration of 'EFI_IFR_AND'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1209) : error C2371: 'EFI_IFR_OR'
 : redefinition; different basic types
        c:\New-Edk\Edk\Foundation\Framework\Include\EfiInternalFormRepresentatio
n.h(339) : see declaration of 'EFI_IFR_OR'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1256) : error C2365: 'EfiKeyLCtrl
' : redefinition; previous definition was a 'enumerator'
        c:\New-Edk\Edk\Foundation\Framework\Protocol\Hii\Hii.h(264) : see declar
ation of 'EfiKeyLCtrl'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1256) : error C2086: 'EfiKeyLCtrl
' : redefinition
        c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1256) : see declaration o
f 'EfiKeyLCtrl'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1257) : error C2365: 'EfiKeyA0' :
 redefinition; previous definition was a 'enumerator'
        c:\New-Edk\Edk\Foundation\Framework\Protocol\Hii\Hii.h(265) : see declar
ation of 'EfiKeyA0'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1257) : error C2086: 'EfiKeyA0' :
 redefinition
        c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1257) : see declaration o
f 'EfiKeyA0'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1258) : error C2365: 'EfiKeyLAlt'
 : redefinition; previous definition was a 'enumerator'
        c:\New-Edk\Edk\Foundation\Framework\Protocol\Hii\Hii.h(266) : see declar
ation of 'EfiKeyLAlt'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1258) : error C2086: 'EfiKeyLAlt'
 : redefinition
        c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1258) : see declaration o
f 'EfiKeyLAlt'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1259) : error C2365: 'EfiKeySpace
Bar' : redefinition; previous definition was a 'enumerator'
        c:\New-Edk\Edk\Foundation\Framework\Protocol\Hii\Hii.h(267) : see declar
ation of 'EfiKeySpaceBar'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1259) : error C2086: 'EfiKeySpace
Bar' : redefinition
        c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1259) : see declaration o
f 'EfiKeySpaceBar'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1260) : error C2365: 'EfiKeyA2' :
 redefinition; previous definition was a 'enumerator'
        c:\New-Edk\Edk\Foundation\Framework\Protocol\Hii\Hii.h(268) : see declar
ation of 'EfiKeyA2'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1260) : error C2086: 'EfiKeyA2' :
 redefinition
        c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1260) : see declaration o
f 'EfiKeyA2'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1261) : error C2365: 'EfiKeyA3' :
 redefinition; previous definition was a 'enumerator'
        c:\New-Edk\Edk\Foundation\Framework\Protocol\Hii\Hii.h(269) : see declar
ation of 'EfiKeyA3'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1261) : error C2086: 'EfiKeyA3' :
 redefinition
        c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1261) : see declaration o
f 'EfiKeyA3'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1262) : error C2365: 'EfiKeyA4' :
 redefinition; previous definition was a 'enumerator'
        c:\New-Edk\Edk\Foundation\Framework\Protocol\Hii\Hii.h(270) : see declar
ation of 'EfiKeyA4'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1262) : error C2086: 'EfiKeyA4' :
 redefinition
        c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1262) : see declaration o
f 'EfiKeyA4'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1263) : error C2365: 'EfiKeyRCtrl
' : redefinition; previous definition was a 'enumerator'
        c:\New-Edk\Edk\Foundation\Framework\Protocol\Hii\Hii.h(271) : see declar
ation of 'EfiKeyRCtrl'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1263) : error C2086: 'EfiKeyRCtrl
' : redefinition
        c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1263) : see declaration o
f 'EfiKeyRCtrl'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1264) : error C2365: 'EfiKeyLeftA
rrow' : redefinition; previous definition was a 'enumerator'
        c:\New-Edk\Edk\Foundation\Framework\Protocol\Hii\Hii.h(272) : see declar
ation of 'EfiKeyLeftArrow'
c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1264) : error C2086: 'EfiKeyLeftA
rrow' : redefinition
        c:\New-Edk\Edk\Foundation\Efi\Include\EfiHii.h(1264) : see declaration o
f 'EfiKeyLeftArrow'

------------------------------------------------------
https://edk.tianocore.org/ds/viewMessage.do?dsForumId=39&dsMessageId=35970

 [ URL]

------------------------------------------------------
https://edk.tianocore.org/ds/viewMessage.do?dsForumId=39&dsMessageId=36094

 [ URL]