Problem in building code with Solaris 9 and g++ compiler

Discussion in 'Software' started by dileepd, Jul 18, 2007.

  1. dileepd

    dileepd

    Joined:
    Jul 18, 2007
    Messages:
    1
    Hi Every one,
    Could you please let me know if you have any clue about following
    things.
    1. Whether type bool acts like a kind of signed int type in g++ on
    solaris 9(a/c to my invetsigation it is "Yes").
    2. If above question is yes,What needs to be done in order for compiler
    to overload constructor once with bool and one with integer.

    Iam asking these question as iam encountering following errors.


    -----------------------------------------------------------------------
    While building the my applicationcode with g++(ver 3.4.6) on solaris 9, iam getting following error with Pegasus files.


    Please let me know, what needs to be done to remove these errors(means compiler settings etc..). This error is occurring because g++ compiler considers bool data type as signed Integer, when passed as an constructor or function argument. First, it is overloading the constructor with "bool" data type and when it comes the turn of "signed integer" to overload constructor, the compiler is giving an error "cannot be overloaded". The error "redefinition" is also due to bool data type.



    note:- i did following typedef's

    typedef bool Boolean;

    typedef signed int Sint32;



    Error is as follows



    ( /usr/local/bin/g++ -DSOLARIS_PLATFORM -DUNIX -DPEGASUS_PLATFORM_SOLARIS_SPARC_GNU -DPEGASUS_OS_SOLARIS -DPEGASUS_HAVE_TEMPLATE_SPECIALIZATION -DEXPAND_TEMPLATES -DPEGASUS_USE_EXPERIMENTAL_INTERFACES -Wno-non-template-friend -DLXI_TRA -D__EXTERN_C__ -Dregister= -D_POSIX_PTHREAD_SEMANTICS -Wno-deprecated -DAUTOPASS_DISABLED -DCLUSTER_GEN_APP -DSTAND_ALONE_INTEG -I"/LXIBUILD/v2.08.00/LXIsrc" -I/LXIBUILD/pegasus/src -I"/LXIBUILD/v2.08.00/LXICommonLib" -O -c -o /LXIBUILD/v2.08.00/LXIobj/LXIBase.o /LXIBUILD/v2.08.00/LXIsrc /LXIBase.cpp );



    In file included from /LXIBUILD/pegasus/src/Pegasus/Common/Array.h:74,



    from /LXIBUILD/pegasus/src/Pegasus/Common/CIMName.h:40,



    from /LXIBUILD/pegasus/src/Pegasus/Client/CIMClient.h:39,



    from /LXIBUILD/v2.08.00/LXIsrc/LXITRAInterface.h:4,



    from /LXIBUILD/v2.08.00/LXIsrc/LXICaTRA.h:24,



    from /LXIBUILD/v2.08.00/LXIsrc/LXIBase.h:11,



    from /LXIBUILD/v2.08.00/LXIsrc/LXIBase.cpp:1:



    /LXIBUILD/pegasus/src/Pegasus/Common/ArrayInter.h:49: error: redefinition of `class Pegasus::Array<Pegasus::Boolean>'



    /LXIBUILD/pegasus/src/Pegasus/Common/ArrayInter.h:49: error: previous definition of `class Pegasus::Array<Pegasus::Boolean>'



    In file included from /LXIBUILD/pegasus/src/Pegasus/Common/MessageLoader.h:42,



    from /LXIBUILD/pegasus/src/Pegasus/Common/Exception.h:44,



    from /LXIBUILD/pegasus/src/Pegasus /Common/CIMName.h:41,



    from /LXIBUILD/pegasus/src/Pegasus/Client/CIMClient.h:39,



    from /LXIBUILD/v2.08.00/LXIsrc/LXITRAInterface.h:4,



    from /LXIBUILD/v2.08.00/LXIsrc/LXICaTRA.h:24,



    from /LXIBUILD/v2.08.00/LXIsrc/LXIBase.h:11,



    from /LXIBUILD/v2.08.00/LXIsrc/LXIBase.cpp:1:



    /LXIBUILD/pegasus/src/Pegasus/Common/Formatter.h:114: error: `Pegasus::Formatter::Arg::Arg(Pegasus::Sint32)' and `Pegasus::Formatter::Arg::Arg(Pegasus::Boolean)' cannot be overloaded



    In file included from /LXIBUILD/pegasus/src/Pegasus/Common/CIMProperty.h:40,



    from /LXIBUILD/pegasus/src/Pegasus/Common/CIMObject.h:42,



    from /LXIBUILD/pegasus/src/Pegasus/Client/CIMClient.h:41,



    from /LXIBUILD/v2.08.00/LXIsrc/LXITRAInterface.h:4,



    from /LXIBUILD/v2.08.00/LXIsrc/LXICaTRA.h:24,



    from /LXIBUILD/v2.08.00/LXIsrc/LXIBase.h:11,



    from /LXIBUILD/v2.08.00/LXIsrc/LXIBase.cpp:1:



    /LXIBUILD/pegasus/src/Pegasus/Common/CIMValue.h:92: error: `Pegasus::CIMValue::CIMValue(Pegasus::Sint32)' and `Pegasus::CIMValue::CIMValue(Pegasus::Boolean)' cannot be overloaded



    /LXIBUILD/pegasus/src/Pegasus/Common/CIMValue.h:147: error: `Pegasus::CIMValue::CIMValue(const Pegasus::Array<Pegasus::Boolean>&)' and `Pegasus::CIMValue::CIMValue(const Pegasus::Array<Pegasus::Boolean>&)' cannot be overloaded



    /LXIBUILD/pegasus/src/Pegasus/Common/CIMValue.h:291: error: `void Pegasus::CIMValue::set(Pegasus::Sint32)' and `void Pegasus::CIMValue::set(Pegasus::Boolean)' cannot be overloaded



    /LXIBUILD/pegasus/src/Pegasus/Common/CIMValue.h:323: error: `void Pegasus::CIMValue::set(const Pegasus::Array<Pegasus::Boolean>&)' and `void Pegasus::CIMValue::set(const Pegasus::Array<Pegasus::Boolean>&)' cannot be overloaded



    /LXIBUILD/pegasus/src/Pegasus/Common/CIMValue.h:377: error: `void Pegasus::CIMValue::get(Pegasus::Sint32&) const' and `void Pegasus::CIMValue::get(Pegasus::Boolean&) const' cannot be overloaded



    /LXIBUILD/pegasus/src/Pegasus/Common/CIMValue.h:409: error: `void Pegasus::CIMValue::get(Pegasus::Array<Pegasus::Boolean>&) const' and `void Pegasus::CIMValue::get(Pegasus ::Array<Pegasus::Boolean>&) const' cannot be overloaded


    *** Error code 1

    make: Fatal error: Command failed for target `/LXIBUILD/v2.08.00/LXIsrc/LXIBase.or'

    --------------------------------------------------------------------------

    Thank and Regards,

    Dileep
    dileepd, Jul 18, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Patriot

    Building to Building wireless

    Patriot, Nov 4, 2003, in forum: Cisco
    Replies:
    2
    Views:
    535
    Walter Roberson
    Nov 4, 2003
  2. Tim Jacob

    Wireless building-to-building 101

    Tim Jacob, Feb 15, 2006, in forum: Wireless Networking
    Replies:
    2
    Views:
    594
    =?Utf-8?B?dGFpcGFuNTQx?=
    Feb 17, 2006
  3. yezdived@gmail.com
    Replies:
    0
    Views:
    961
    yezdived@gmail.com
    Mar 8, 2006
  4. Vipul Pathak
    Replies:
    6
    Views:
    3,914
    Mark Gillespie
    Apr 3, 2006
  5. Jim
    Replies:
    5
    Views:
    899
    Barb Bowman
    Oct 5, 2007
Loading...

Share This Page