Linker issues with POCO library

449 views Asked by At

I am trying to use POCO libraries for threading framework in my project. I am getting linker errors for POCO functions like

ServiceMain.o: In function _GLOBAL__sub_I__ZN18CServiceMain10mpInstanceE': ServiceMain.cpp:62: undefined reference toPoco::Event::Event(Poco::Event::EventType)'

Logging.o: In function _GLOBAL__sub_I__ZN7Log11mLogStringsB5cxx11E': Logging.cpp:88: undefined reference toPoco::Mutex::Mutex(Poco::Mutex::MutexType)'

Could some one tell me what is the issue ? And what is the meaning of "_GLOBAL__sub_I" ?

1

There are 1 answers

0
RegularlyScheduledProgramming On

Your issue looks like you've failed to correctly include either the linker or include path flags for Poco's Foundation library. If you're on a *nix system your flags will look something like this:

-L/path/to/poco/libs/ -lPocoFoundation -I/path/to/poco/include

On OSX with brew installed Poco I would use:

-L/usr/local/lib -lPocoFoundation -I/usr/local/include