Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > General Computer Discussion > Software > Problem in building code with Solaris 9 and g++ compiler

Reply
Thread Tools

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

 
 
dileepd dileepd is offline
Junior Member
Join Date: Jul 2007
Posts: 1
 
      07-18-2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
build problem in solaris when building idutils-4.2 naagu C++ 0 07-20-2011 07:48 AM
Problem building 64-bit python 2.6.2 on Solaris 10 John Center Python 7 06-03-2009 06:49 AM
Building on Solaris and trouble with missing libcrypt_d Justin Johnson Ruby 1 05-27-2008 10:55 PM
Problem with solaris compiler parag_paul@hotmail.com C++ 1 09-28-2007 12:54 PM
Solaris 9, problem building Python 2.1.1 Dave Harrison Python 0 07-16-2003 12:34 AM



Advertisments