I have the following:
class BSA
{
...
...
...
...
public:
enum VRGAttrId {
attrIdVRGNull,
attrIdVRGAdminStatus,
attrIdVRGVRNames,
attrIdVRGRowStatus,
attrIdVRGLocations
};
typedef set<VRGAttrId, less<VRGAttrId> > VRGAttrIdSet;
typedef pair<Status, VRGAttrId> VRGStatusPair;
}
when i compile/link, i am getting the following link error
In function `BSA::~BSA(void)':
undefined reference to
`rb_tree<BSA::VRGAttrId, BSA::VRGAttrId,
identity<BSA::VRGAttrId>, less<BSA::VRGAttrId>,
__alloc<true, 0> >::clear(void)'
The class "BSA" is composed of several other classes
and it used to compile and link fine, till I added the above
I dont have any "rb_tree" in the code. I guess this is some
STL internal symbol? How do i get rid of the problem?
thanks in adv
I am usung ccppc (win2k cross compiler for ppc ). Since this class
is huge I cant check with g++.
-sb 5 2027
"sriram" <sr*******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com... I have the following:
[Cut code using std::set or unadorned set.]
when i compile/link, i am getting the following link error In function `BSA::~BSA(void)': undefined reference to `rb_tree<BSA::VRGAttrId, BSA::VRGAttrId, identity<BSA::VRGAttrId>, less<BSA::VRGAttrId>, __alloc<true, 0> >::clear(void)'
The class "BSA" is composed of several other classes and it used to compile and link fine, till I added the above I dont have any "rb_tree" in the code. I guess this is some STL internal symbol? How do i get rid of the problem?
You need to link against the library that should
have been installed with your compiler that
provides that implementation of (std::)set.
You have likely got a misconfigured installation
of your compiler, or the include paths are messed
up, or the library search paths are messed up.
To help sort it out, you should take this to some
other forum where that would be topical, assuming
that you do not solve it yourself, of course.
thanks in adv
You're welcome in retrospect.
I am usung ccppc (win2k cross compiler for ppc ). Since this class is huge I cant check with g++.
Another compiler will not expose your problem
so much as add more confusion factors.
--
--Larry Brasfield
email: do***********************@hotmail.com
Above views may belong only to me.
The same class has other members using std::set in similar ways.
I am just extending this to the above class To help sort it out, you should take this to some other forum where that would be topical, assuming that you do not solve it yourself, of course
Which forum? Can you suggest?
thanks again
-sb
sriram wrote: I have the following:
class BSA { .. .. .. .. public: enum VRGAttrId { attrIdVRGNull, attrIdVRGAdminStatus, attrIdVRGVRNames, attrIdVRGRowStatus, attrIdVRGLocations }; typedef set<VRGAttrId, less<VRGAttrId> > VRGAttrIdSet; typedef pair<Status, VRGAttrId> VRGStatusPair;
}
when i compile/link, i am getting the following link error In function `BSA::~BSA(void)': undefined reference to `rb_tree<BSA::VRGAttrId, BSA::VRGAttrId, identity<BSA::VRGAttrId>, less<BSA::VRGAttrId>, __alloc<true, 0> >::clear(void)'
The class "BSA" is composed of several other classes and it used to compile and link fine, till I added the above I dont have any "rb_tree" in the code. I guess this is some STL internal symbol? How do i get rid of the problem? thanks in adv
I am usung ccppc (win2k cross compiler for ppc ). Since this class is huge I cant check with g++. -sb
"sriram" <sr*******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com... The same class has other members using std::set in similar ways.
For some reason, I doubt that you are using the
std::set::clear() method in those other members.
Are you sure the similarity goes that far? I can
all but guarantee that the library destructor for
the std::set that came with your compiler has
been tested and the functions that it actually
needs can be found in the compiler distribution.
What I suspect has happened, (to elaborate
upon what I told you earlier), is that you have
mixed header files for one compiler with those
for another compiler. This sort of thing is easy
to do in cross-compilation scenarios. It need
not occur by actual mixing of incompatible
files in one directory; only the set of directories
searched by the compiler (as it was actually
invoked) need encompass the incompatible
set of files. Because of the variety of ways
that the search list and order is defined for
different compilers, the details of how this
occurs are off-topic here.
I am just extending this to the above class
There are really very few possibilities here:
1. The missing template definition should have
come directly or indirectly, from a header that
never got #include'd because of something in
your compiler's (as invoked) search order.
2. The missting template reference should not
have existed and would not have but for the
#include of an incorrect header, again due to
the compiler's search order being wrong.
3. Somebody has been doing something foul
with namespace manipulations that cause the
reference and definition to actually occur in
different namespaces, even though the design
of the library requires them to be in the same
namespace.
The error you have quoted, together with your
assertion that you did not explictly use the missing
function (and some knowledge of where template
function definitions must reside for your compiler)
leaves few alternatives, (at least that I can see). To help sort it out, you should take this to some other forum where that would be topical, assuming that you do not solve it yourself, of course Which forum? Can you suggest?
Folks at the gnu.gcc.help newsgroup can help
you figure out what compiler installation details
have gotten fouled up to produce that error.
There is also a mailing list covering the ccppc
compiler at http://gcc.gnu.org/ml/gcc-help/ .
Of course, if the problem is foul namespace
manipulation, you will have to solve that.
At this point, I would suggest that you produce
a minimal program, preferrably all in one block
of text (except for system #include's), that still
exhibits this problem. Very likely, in the course
of creating that, you will discover what has gone
wrong. And if not, it will help others to get to
the bottom of the problem.
thanks again
Good luck.
[snip] when i compile/link, i am getting the following link error In function `BSA::~BSA(void)': undefined reference to `rb_tree<BSA::VRGAttrId, BSA::VRGAttrId, identity<BSA::VRGAttrId>, less<BSA::VRGAttrId>, __alloc<true, 0> >::clear(void)'
--
--Larry Brasfield
email: do***********************@hotmail.com
Above views may belong only to me.
"sriram" <sr*******@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com... when i compile/link, i am getting the following link error In function `BSA::~BSA(void)': undefined reference to `rb_tree<BSA::VRGAttrId, BSA::VRGAttrId, identity<BSA::VRGAttrId>, less<BSA::VRGAttrId>, __alloc<true, 0> >::clear(void)'
The class "BSA" is composed of several other classes and it used to compile and link fine, till I added the above I dont have any "rb_tree" in the code. I guess this is some STL internal symbol? How do i get rid of the problem? thanks in adv
I am usung ccppc (win2k cross compiler for ppc ). Since this class is huge I cant check with g++. -sb
Use the C++ compiler (c++ppc, cxxppc, etc.), not the "generic" frontend. It
doesn't pull in the C++ libraries. Also, if you are compiling for VxWorks,
make sure you are NOT doing a full link (compile with -c and link with -r).
this is solved now. i overlooked the fact that I needed to do template
instantiation :(
shows i am dummy :) in c++
thanks for helpful advices to both of you
-sb This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Google Mike |
last post by:
I have RH9 and am using the PHP and MySQL that came with it. I was
doing fine with all manner of my web pages for this app until I
started having...
|
by: WindAndWaves |
last post by:
Hi Gurus
The page below has a strange error. It seems to be working very well, just
when you enter 8 or 9 for day, month or year then you get an...
|
by: Neil Ginsberg |
last post by:
I have a strange situation with my Access 2000 database. I have code in the
database which has worked fine for years, and now all of a sudden...
|
by: Gav |
last post by:
Hi all,
I'm having this strange problem where, in a web app, I have 2 different
links to a different form. One is just a straight forward link...
|
by: Martin Joergensen |
last post by:
Hi,
I've encountered a really, *really*, REALLY strange error :-)
I have a for-loop and after 8 runs I get strange results...... I
mean: A...
|
by: Ian |
last post by:
Hi everyone,
I have found some bizarre (to me...!) behaviour of the Form_Activate
function. I have a form which has a button control used to...
|
by: maryjones11289 |
last post by:
Hi,
I have a strange problem that hopefully someone can advise me on...
I have a Gridview which is not bound to a dataset etc. I populate the...
|
by: =?Utf-8?B?R2Vvcmdl?= |
last post by:
Hello everyone,
I am migrating my C++ COM server to managed code (C# COM server). I am using
the same client to use the same COM class in COM...
|
by: David |
last post by:
I'm using the AxSHDocVw.WebBrowser control to download data from a webpage
at work (it's an internal page on my company's intranet).
The page...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
|
by: jalbright99669 |
last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...
| |