[jacorb-developer] idl compilation errors for enums with different names but same element names

Troy Hicks troy.a.hicks at gmail.com
Mon Jul 2 22:38:32 CEST 2012


I'm not 100% that this will work, but I have used a command line flag for
the idl compiler to force the prefixing a namespace for a batch of idl
files.  You may want to experiment with this to determine if it will
resolve your issue.  I used this approach due to idl compilations issues as
well, but they may not have been precisely the same naming issues you noted.

On Mon, Jul 2, 2012 at 3:07 PM, Alka Nand <alka.nand at gmail.com> wrote:

> Hi,
>
> I have 2 idl files ethernetportypes.idl and ethernetporttypesR.idl  which
> define enums which have different names but the entries are the same name.
> Is there a compilation flag that I can set to get around this apparent
> namespaces problem? Since Java allows this why is the idl compiler
> complaining?
>
> module EthernetPortTypes {
>
>    /* Status for each port */
>    /* Represents the led state of a EthernetPort
>    The enum values map to the port type and its led status */
>    enum* LinkStateR1_T* {
>       /* Eth Port is down */
>       *eETHLINKDOWN,*
>       /* Eth Port is up but no TX/RX */
>     *  eETHLINKUP,*
>       /* Eth Port is up with activity */
>      * eETHLINKACTIVE,*
>       /* Eth Port State Unknown */
>       *eUNKNOWN*
>    };
>
> ethernetportypesR.idl has the following
>
> module EthernetPortTypes {
>    enum *LinkState_T* {
>       /* Eth Port is down */
>       *eETHLINKDOWN*,
>       /* Eth Port is up but no TX/RX */
>      * eETHLINKUP,*
>       /* Eth Port is up with activity */
>      * eETHLINKACTIVE,*
>       /* DSL Port IDLE Unconfigured */
>       eIDLENOTCONFIGURED,
>       /* DSL Port IDLE Configured */
>       eIDLECONFIGURED,
>       /* DSL Port attempting to connect with ATUR */
>       eRUNNINGACTIVATION,
>       /* DSL Port busy establishing link */
>       eRUNNINGINIT,
>       /* DSL Port data transport is active */
>       eRUNNINGSHOWTIMEL0,
>       /* DSL Port Testmode is active */
>       eTESTMODE,
>       /* DSL Port Loop Diagnostics Init Ongoing */
>       eRUNNINGLDINIT,
>       /* DSL Port Loop Diagnostics complete */
>       eIDLELDCOMPLETE,
>       /* DSL Port data transport active in L2 Power Mgmt Mode */
>       eRUNNINGSHOWTIMEL2,
>       /* Eth/DSL Port State Unknown */
>       *eUNKNOWN*
>    };
>
>
> I am seeing the following idl compilation error
>
>    [jacidl] processing idl file:
>
> V:\nanda_iptv\vobs_components_mxip_emsne_interface\idl\ethernetportmgr\ethernetportmgr.idl
>    [jacidl] processing idl file:
>
> V:\nanda_iptv\vobs_components_mxip_emsne_interface\idl\ethernetportmgr\ethernetportmgrR.idl
>    [jacidl] Jun 27, 2012 3:35:26 PM org.jacorb.idl.util.IDLLogger error
>    [jacidl] SEVERE: ethernetporttypesR.idl, line:50(20): Identifier
> eETHLINKDOWN already defined in immediate scope
>    [jacidl]   enum LinkState_T
>    [jacidl] Jun 27, 2012 3:35:26 PM org.jacorb.idl.util.IDLLogger error
>    [jacidl] SEVERE: ethernetporttypesR.idl, line:50(20): Identifier
> eETHLINKUP already defined in immediate scope
>    [jacidl]   enum LinkState_T
>    [jacidl] Jun 27, 2012 3:35:26 PM org.jacorb.idl.util.IDLLogger error
>    [jacidl] SEVERE: ethernetporttypesR.idl, line:50(20): Identifier
> eETHLINKACTIVE already defined in immediate scope
>    [jacidl]   enum LinkState_T
>    [jacidl] Jun 27, 2012 3:35:26 PM org.jacorb.idl.util.IDLLogger error
>    [jacidl] SEVERE: ethernetporttypesR.idl, line:50(20): Identifier
> eUNKNOWN already defined in immediate scope
>    [jacidl]   enum LinkState_T
>
>    [jacidl] Jun 27, 2012 3:35:26 PM org.jacorb.idl.util.IDLLogger error
>
>    [jacidl] SEVERE:
>
> V:\nanda_iptv\vobs_components_mxip_emsne_interface\idl\ethernetportmgr\ethernetportmgrR.idl,
> line: 992(1): 4 error(s).
>
>    [jacidl]
>
> Target 'idl' failed with message 'org.jacorb.idl.ParseException: Parse
> error : Lexer errors'.
>
>
>
> --
>
> alka
> _______________________________________________
> jacorb-developer maillist  -
> jacorb-developer at lists.spline.inf.fu-berlin.de
> https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer
>


More information about the jacorb-developer mailing list