M
mieskola
Below, I posted the error, the function call that generated the error,
and the function itself. I have been spinning my wheels trying to
figure this out. The source files compile, just generating a test
executable fails. This code works on on a Digital UNIX machine, but
fails while I am trying to port to Linux.
Thanks.
ERROR:
------------
someFile.C:83: undefined reference to `MsgRouter<int,
CALLING POINT:
------------------------
someFile.C -> LINE 82: MsgCatcher lCatcher;
someFile.C -> LINE 83: msgRouter.Register(1, &lCatcher);
where MsgCatcher is defined as: class MsgCatcher : public
MsgHandler<string> {..}
FUNCTION:
-----------------
template<class KeyType, class MsgType>
void MsgRouter<KeyType, MsgType>::
Register(const KeyType &ipKey, MsgHandler<MsgType> *ipHandler)
{
// some code here ...
}
and the function itself. I have been spinning my wheels trying to
figure this out. The source files compile, just generating a test
executable fails. This code works on on a Digital UNIX machine, but
fails while I am trying to port to Linux.
Thanks.
ERROR:
------------
someFile.C:83: undefined reference to `MsgRouter<int,
::Register(int const&, MsgHandler<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >*)'
CALLING POINT:
------------------------
someFile.C -> LINE 82: MsgCatcher lCatcher;
someFile.C -> LINE 83: msgRouter.Register(1, &lCatcher);
where MsgCatcher is defined as: class MsgCatcher : public
MsgHandler<string> {..}
FUNCTION:
-----------------
template<class KeyType, class MsgType>
void MsgRouter<KeyType, MsgType>::
Register(const KeyType &ipKey, MsgHandler<MsgType> *ipHandler)
{
// some code here ...
}