473,769 Members | 3,923 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

compilation error: cannot be overloaded

Hello,

I am trying to compile C++ code which uses rogue wave 9.0 classes on
RHEL
4.0. I use gnu g++ compiler to compile the code.
Compiler is not able to match the right type of parameters to overload
the
methods of RW classes.
Below are the two methods among others in the rw/ep_scntn.h header
file
where compiler says cannot be overloaded.

RWBoolean contains(RWBool ean(*fn)(const_ value,void*),vo id* x) const;
RWBoolean contains(RWBool ean(*fn)(value_ type,void*),voi d* x) const
{ return base_type::cont ains(fn,x); }

Compiler is treating the first parameter in above methods as same.

When I issue a make command from one of our c++ module, I get below
error

/usr/bin/g++ -g -fpic -D_POSIX_SOURCE -DTRACING -D__EXTENSIONS__ -
D__RWCOMPILER_H __
-D_REENTRANT -D_RWCONFIG=8s -D_RWCONFIG_12d -D_RWSTDDEBUG -
DRWDEBUG -c
TrackListMap.C -I../inc -I/psalms/common/inc -I/psalms/common/Map/inc -
I/psalms/common/Scan/inc
-I/opt/ossasn1/linux-glibc2.2.trial/8.2.0-betaA/include -I/psalms/
common/ASNFw2/sep/inc
-I/psalms/common/DbFw/inc -I/psalms/common/DbFwMgr/inc -I/psalms/
common/Time/inc
-I/psalms/common/LoggingFw/inc -I/psalms/common/ExcepFw/inc -I/psalms/
common/ConfigFw/inc
-I/psalms/common/SdtArm/inc -I/opt/RogueWave/SourcePro -o
TrackListMap.o

In file included from ../inc/TrackListMap.h: 18,
from TrackListMap.C: 15:
/opt/RogueWave/SourcePro/rw/ep_scntn.h: In instantiation of
`RW_PCntnr<std: :vector<const RWCString*, std::allocator< const
RWCString*,
RWTPtrOrderedVe ctor<const RWCString, std::allocator< const RWCString*>
>,
const RWCString>':
/opt/RogueWave/SourcePro/rw/ep_seq.h:50: instantiated from
`RW_PSeq<std::v ector<const RWCString*, std::allocator< const
RWCString*,
RWTPtrOrderedVe ctor<const RWCString, std::allocator< const RWCString*>
>,
const RWCString>'
/opt/RogueWave/SourcePro/rw/tpordvec.h:65: instantiated from
`RWTPtrOrderedV ector<const RWCString, std::allocator< const RWCString*>
>'
/psalms/common/Map/inc/MapFile.h:27: instantiated from here
/opt/RogueWave/SourcePro/rw/ep_scntn.h:92: error: `RWBoolean
RW_PCntnr<StdCo ll, RWColl, T>::contains(RW Boolean (*)(typename
StdColl::value_ type, void*), void*) const [with StdColl =
std::vector<con st
RWCString*, std::allocator< const RWCString*, RWColl =
RWTPtrOrderedVe ctor<const RWCString, std::allocator< const RWCString*>
>, T =
const RWCString]' and `RWBoolean RW_PCntnr<StdCo ll, RWColl,
T>::contains(RW Boolean (*)(const T*, void*), void*) const [with
StdColl =
std::vector<con st RWCString*, std::allocator< const RWCString*,
RWColl =
RWTPtrOrderedVe ctor<const RWCString, std::allocator< const RWCString*>
>, T =
const RWCString]' cannot be overloaded
/opt/RogueWave/SourcePro/rw/ep_scntn.cc:96: error: `typename
RW_PCntnr<StdCo ll, RWColl, T>::value_type RW_PCntnr<StdCo ll, RWColl,
T>::find(RWBool ean (*)(typename StdColl::value_ type, void*), void*)
const
[with StdColl = std::vector<con st RWCString*, std::allocator< const
RWCString*, RWColl = RWTPtrOrderedVe ctor<const RWCString,
std::allocator< const RWCString*, T = const RWCString]' and
`typename
RW_PCntnr<StdCo ll, RWColl, T>::value_type RW_PCntnr<StdCo ll, RWColl,
T>::find(RWBool ean (*)(const T*, void*), void*) const [with StdColl =
std::vector<con st RWCString*, std::allocator< const RWCString*,
RWColl =
RWTPtrOrderedVe ctor<const RWCString, std::allocator< const RWCString*>
>, T =
const RWCString]' cannot be overloaded
............... ...........
............... ............
any idea why we get above error. and how to fix the same.

Thanks & Regards,
Prakash

Apr 20 '07 #1
1 7171
<pr***********@ gmail.comwrote in message
news:11******** *************@l 77g2000hsb.goog legroups.com...
: I am trying to compile C++ code which uses rogue wave 9.0 classes on
: RHEL
: 4.0. I use gnu g++ compiler to compile the code.
: Compiler is not able to match the right type of parameters to overload
: the
: methods of RW classes.
: Below are the two methods among others in the rw/ep_scntn.h header
: file
: where compiler says cannot be overloaded.
:
: RWBoolean contains(RWBool ean(*fn)(const_ value,void*),vo id* x) const;
: RWBoolean contains(RWBool ean(*fn)(value_ type,void*),voi d* x) const
: { return base_type::cont ains(fn,x); }
:
: Compiler is treating the first parameter in above methods as same.
Hmm, just making a best guess from this short code fragment:
Unless const_value and value_type are reference-types, the above
overload is indeed illegal.
The const-ness of a by-value parameter does not affect the
signature of a function. That is, the two following declarations
are not overloads, but refer to the exact same function:
void f( int a );
void f( int const a );

: any idea why we get above error. and how to fix the same.

Concretely, the following would be valid:
RWBoolean contains(RWBool ean(*fn)(const_ value&,void*),v oid* x) const;
RWBoolean contains(RWBool ean(*fn)(value_ type&,void*),vo id* x) const

[ Assuming typedef T value_type; typedef T const const_value; ]

If you need further guidance, please try to extract a
self-contained code sample that reproduces the error,
or ask on a forum dedicated to the Rogue Wave libraries...

I hope this helps,
Ivan
--
http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form
Brainbench MVP for C++ <http://www.brainbench.com

Apr 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
325
by: Jill Graham | last post by:
Hi, From time to time, I receive following error message when trying to access my website. When the error occurs, I have to recompile my dll until the error disappears (this without changing anything in my code). Where does this error come from ? What can I do to solve the problem ? Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following...
2
1759
by: tuko | last post by:
Hello kind people. The folliowing code gives me a compilation error, under MSVC 6.0 and intel 8.0 compiler. It compiles fine with g++ 3.3.1 and borland 5.5 Can you tell me please if the code is correct?. If the code is correct do you know any tip to "circumvent" the compilation error?
1
1405
by: Jill Graham | last post by:
Hi, From time to time, I receive following error message when trying to access my website. When the error occurs, I have to recompile my dll until the error disappears (this without changing anything in my code). Where does this error come from ? What can I do to solve the problem ? Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following...
9
2341
by: subramanian | last post by:
Hello. Consider the following code fragment : enum TestEnum { val1 = 10, val2 = 100, val3 = 1000 }; class Test { public : enum TestEnum { val1 = 1, val2 val3 }; Test(int i = 0, int j = 0, TestEnum val = TestEnum(0)); ...
1
2812
by: BSand0764 | last post by:
I'm getting an error that I can't seem to resolve. When I compile the Functor related logic in a test program, the files compile and execute properly (see Listing #1). However, when I incorporate the same logic within my simulation, the class that implements the functor logic has problems compiling. I get the following errors: -- Building myTest.cpp --
3
2118
by: subramanian100in | last post by:
Consider the following program: #include <iostream> using namespace std; class Base { public: Base(int x = 0);
3
3193
by: Sindhu Rani | last post by:
i hav created 3 classes in 3 different files. am gettin an error durin compilation. wat shud i do??? C:\s\source>javac -d ..\classes devtestdrive.java devtestdrive.java:5: cannot resolve symbol symbol : class device location: class devtestdrive device d1=new tv(); ^ devtestdrive.java:5: cannot resolve symbol symbol : class tv
4
1897
by: pjr | last post by:
Hi.. I am trying to compile a set of code using aCC 3.52(HP-UX 11.00) and visibroker 3.3. I am running into following error. I appreciate any ideas that can help me resolve this error. Error 328: "/usr/local/vbroker/include/ir_c.hh", line 6795 # Function '>>' has not been defined yet; cannot call.
2
4999
by: kevinr | last post by:
Hi, I am brand new to VB, and I am trying to deploy Office 2007 on my network here at work. We used part of this script to do another deployment, and I have taken pieces and tried to edit for this deployment. I know I am probably way off the mark, but I would appreciate any help. This is the initial error I receive when running the script. C:\bkuptestpc\kr_migrate.vbs(276, 1) Microsoft VBScript compilation error: Expected 'End' Exit code: 1 ,...
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10049
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5309
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.