Possible Duplicate:
What is an undefined reference/unresolved external symbol error and how do I fix it?
#include <FakeMas.h>
#include <zinc-testsupport-client-api/ClientFactory.h>
#include <zinc-testsupport-client-api/Process.h>
#include <zinc-testsupport-client-api/ProcessCreator.h>
FakeMas::FakeMas() {
ClientFactory &clientFactory(PluginFactory::getInstance<ClientFactory>(pluginConfig));
boost::shared_ptr<ProcessCreator> webServerProcessCreator = clientFactory.createProcessCreator();
}
when I build it, I get an error says :
...../src/.libs/libZincTestWebServer.so: undefined reference to `zinc::testsupport::client::ClientFactory::createProcessCreator()'
the interesting thing is that if I comment off the second line of class
boost::shared_ptr<ProcessCreator> webServerProcessCreator = clientFactory.createProcessCreator()
then it will build success
so I feel confused, it seems there is no linkage problem since it can be built with
ClientFactory &clientFactory(PluginFactory::getInstance<ClientFactory>(pluginConfig))
so How it can find the class but cannot find the function??
BTW, I think the function is declared and defined in a right way:
boost::shared_ptr<ProcessCreator> ClientFactory::createProcessCreator() {
.........
}
any one got any idea about it? Thanks