R
repairman2003
Here's where the linker is running into an issue:
template <typename T>
void Engine::setEventReceiver(T receiver)
{
m_device->setEventReceiver(receiver);
}
I've got that function in a static library that my client program is
calling. I'm almost certain that this linker error is being caused
because the lib has no information about the type of object I'm
sending it. The type I'm passing into this is a custom type that
should not be in the lib file--it's a class that is holds client side
events and doesn't belong in this library.
here is the class info I'm using for the type:
class EventReceiver : public IEventReceiver
{
...
};
and the calling info in main:
Engine* engine...
EventReceiver receiver;
engine->setEventReceiver<EventReceive>(receiver);
Am I correct in why it is throwing that linker issue? What are my
options in getting around this?
template <typename T>
void Engine::setEventReceiver(T receiver)
{
m_device->setEventReceiver(receiver);
}
I've got that function in a static library that my client program is
calling. I'm almost certain that this linker error is being caused
because the lib has no information about the type of object I'm
sending it. The type I'm passing into this is a custom type that
should not be in the lib file--it's a class that is holds client side
events and doesn't belong in this library.
here is the class info I'm using for the type:
class EventReceiver : public IEventReceiver
{
...
};
and the calling info in main:
Engine* engine...
EventReceiver receiver;
engine->setEventReceiver<EventReceive>(receiver);
Am I correct in why it is throwing that linker issue? What are my
options in getting around this?