Class tables [Vtable] dependent on key function
Alex Bobby <[email protected]> Sun, 30 Jan 2005 06:04:34 +0000 (GMT)
| Newsgroups | gmane.comp.programming.cppug |
|---|---|
| Message-ID | <[email protected]> |
Hello,
Could I be revealed about whats wrong?
My environment details are:
1)
HP-UX
2)
aCC compiler
3)
Compiling was done as:
aCC -AA ExceptionImplementation.cpp
4)
Error was:
/usr/ccs/bin/ld:
Unsatisfied symbols:
Class tables [Vtable] dependent on
key function: "ToolkitException::~ToolkitException()" (data)
HP document says...
Unsatisfied Symbols if Using Non-current Support Library
If you see a message like the following, you may be using a non-current
version of the HP aC++ run-time support library.
/opt/aCC/lbin/ld: Unsatisfied symbols:
Class tables [Vtable] dependent on key function:
Â__versioned_type_info::~__versioned_type_info()Â (data)
For example, if you are a library distributor, you must ensure that your
customers use the same or a newer version of the libCsup run-time
library as you. If necessary, you should install the most current HP
aC++ library support patch and distribute this patch to your customers
To my knowledge, I am complying with.
4)
ExceptionInterface.hpp
#include<string>
#include<vector>
#include<stdexcept>
using namespace std ;
class ToolkitException : public exception
{
private:
vector<string> params;
string errCode;
ToolkitException* pointertothisobject;
public:
//Default Constructor
ToolkitException (void);
//Constructor
ToolkitException
(
string excCode,
vector<string> errParams
);
//Destructor
virtual ~ToolkitException (void);
//Returns Error Code
const string& getErrCode (void);
//Returns Error Message
virtual const string& toString (void);
};
5)
ExceptionImplementation.cpp
#include<iostream>
#include<string>
#include<vector>
#include "ExceptionInterface.hpp"
#include<stdlib.h>
// Implementation of Default Constructor for the class ToolkitException
inline ToolkitException :: ToolkitException (void)
{
ToolkitException* pointer = new ToolkitException;
}
// Implementation of Constructor for the class ToolkitException
inline ToolkitException :: ToolkitException
(
string excCode,
vector<string> errParams
)
{
//Initialize the state of the base object
ToolkitException* pointer = new ToolkitException();
pointer -> pointertothisobject = pointer;
pointer -> errCode = excCode ;
vector<string>::iterator ITR1 = errParams.begin();
vector<string>::iterator ITR2 = (pointer -> params).begin();
while (ITR1 != errParams.end () )
{
*ITR2 = *ITR1;
ITR1 ++;
ITR2 ++;
}
}
inline ToolkitException :: ~ToolkitException (void)
{
delete pointertothisobject;
}
int main (void)
{
vector<string> svector;
vector<string>::iterator ITR = svector.begin();
for (int i =0; i <=2 ; i++)
{
*ITR = "AlexBobby";
ITR ++;
}
ToolkitException object("Alex", svector);
cout << "Object size is "<< sizeof(object);
return (EXIT_SUCCESS);
}
---------------------------------
ALL-NEW Yahoo! Messenger - all new features - even more fun!