Go Back   Velocity Reviews > General Computer Discussion > Software
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
Old 07-18-2007, 03:05 PM   #1
Default Problem in building code with Solaris 9 and g++ compiler


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::Boo lean>&) 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
dileepd is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
need code problem gaurav_kant Software 0 09-29-2007 01:31 PM
Problem in VHDL code. caylakprogramci Hardware 2 05-07-2007 07:30 PM
problem with code for random number generation sandeep_sp7 Hardware 0 04-12-2007 04:59 PM
Re: Virus Problem ** Help!** David BlandIII A+ Certification 1 03-02-2004 06:00 PM
Re: Serious Computer Problem hootnholler A+ Certification 1 11-24-2003 12:18 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46