Compilation error
Hi,
My original code was on Forte Developer 7 (Solaris 9) .
Now I am compiling the code on Sun Studio 11 (Solaris 9).
But I am getting "The base must be a previously defined class or struct" error.
Here is a part of my header file :
///my .h file
#include <exception>
.........
.........
.........
#define PRECOND(cond,exception)KMS_ASSERT_MSG_XCPT((cond)&&isInvariant(),"Precondition failure",(exception))
.......
.......
.......
class assertion_fail{};
template <typename E> class AssertionFail : public E,public assertion_fail
{
public:
AssertionFail(const E&e):E(e){};
};
.............
.............
Here is part of my .cxx file
.............
.............
template <class RequestType>
kmsTypes::TIdentifier
TSingletonRequestList<RequestType>::add(RequestType* req) throw (Duplicate)
{
PRECOND(0 != req, "null RequestType");
AUTO_LOCK(_mutex);
return _add(req);
}
.....................
.....................
The function add is being called in another .cxx file.
When I compile the code using make, I am getting the following error:
"./kmsAssert.h", line 90: Error: The base "E" must be a previously defined class or struct.
"./abc.cxx", line 64:Where: While specializing "AssertionFail<char[17]>".
"./abc.cxx", line 64:Where: Instantiated from TSingletonRequestList<DownlinkRequest>::add(DownlinkRequest*).
__
I really don't know why I am getting this compilation error. Can anybody please help me ?
Message was edited by:
RameshACSTS

