473,385 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
Jul 18 '07 #1
1 2250
weaknessforcats
9,208 Expert Mod 8TB
First of all:
typedef bool Boolean;

typedef signed int Sint32;
this does not create new types Boolean and Sint32. All it does is create a new name for bool and signed int.

Ctor::Ctor(Boolean)
{

}
Ctor::Ctor(bool) //error redefiniton
{

}
Jul 18 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Dave Harrison | last post by:
Ok before I start, please dont mail me telling me to use a more recent version of Python, I _would_ use 2.2.x but due to an existing framework all based on using 2.1.1 I have been specifically told...
1
by: Mark Nelson | last post by:
Hi I'm trying to build Imaging 1.1.4 in Solaris 9, I get passwd the first step i.e the building of libImging. However when I execute a python setup.py build I get the following error - gcc...
0
by: Bob Swerdlow | last post by:
I'm trying to install MySQLdb 0.9.2 so I can access my MySQL database from python under Solaris 8. I found the notes on changing the include and lib paths and it seems to find them okay, but when...
2
by: Thomas Heller | last post by:
I'm trying to build Python on the sourceforge compile farm's solaris platform. ./configure fails with this error message: x86-solaris1:~/python/dist/src$ ./configure checking MACHDEP... sunos5...
2
by: Avi Uziel | last post by:
Hi All, I have a linkage problem that I believe related to template instantiation. My environment is Solaris 5.6, Compiler WorkShop 5. I'm building a shared library which use templates. During...
1
by: Justin Johnson | last post by:
Hello, I'm trying to build Python 2.5.0 on AIX 5.3 using IBM's compiler (VisualAge C++ Professional / C for AIX Compiler, Version 6). I run configure and make, but makes fails with undefined...
1
by: parag_paul | last post by:
static char* nullStr = "null"; This line in the solaris mode64 ( cc -m64 flag, gives out the following warning message ) "virvpirw.cc", line 371: Warning: String literal converted to char* in...
7
by: plumb and tree | last post by:
I've been trying for days to build 64 bit python with Solaris 10 + Sun Studio 12. Can anyone helpl please. This is how I tried to do build: # ./configure --prefix=/opt/python2.4...
0
by: mg | last post by:
When make gets to the _ctypes section, I am getting the following in my output: building '_ctypes' extension creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/ Modules/_ctypes...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.