I am having trouble with Boost and my Mac OS X.
I am using Qt Creator as a development platform for C++ projects, primarily because of the IDE and qmake
.
Right now I am working on a C++ app that is supposed to be cross-platform but I do not want to use the Qt
framework itself. Instead I am using the STD libraries (C++11), Poco
and Boost
.
One of the things I am trying to achieve is a plugin system that loads dynamically linked libraries at runtime.
I saw a few projects like Boost-extension
which is no longer supported and several others.
Right now I am using Poco's Shared Libraries and their Class Loader
. I am following closely the tutorial at the end of the presentation. Unfortunately I cannot get it working and I am receiving the following error upon compilation, where the ServiceBase
class is my plugin interface.
Undefined symbols for architecture x86_64:
"Poco::SharedLibrary::getSymbol(std::string const&)", referenced from:
Poco::ClassLoader<ServiceBase>::loadLibrary(std::string const&, std::string const&) in main.o
"Poco::SharedLibrary::hasSymbol(std::string const&)", referenced from:
Poco::ClassLoader<ServiceBase>::loadLibrary(std::string const&, std::string const&) in main.o
"Poco::SharedLibrary::SharedLibrary(std::string const&)", referenced from:
Poco::ClassLoader<ServiceBase>::loadLibrary(std::string const&, std::string const&) in main.o
"Poco::SystemException::SystemException(std::string const&, int)", referenced from:
Poco::MutexImpl::unlockImpl() in main.o
Poco::MutexImpl::lockImpl() in main.o
"Poco::LibraryLoadException::LibraryLoadException(std::string const&, std::string const&, int)", referenced from:
Poco::ClassLoader<ServiceBase>::loadLibrary(std::string const&, std::string const&) in main.o
ld: symbol(s) not found for architecture x86_64
I have the Poco libraries linked and pretty much everything seems to be implemented.
Any advice on how to fix that?
P.S. I am also looking for alternatives on implementing the plugin system, probably more-powerful and certainly cross-platform.