Reputation: 65
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 to
Poco::Event::Event(Poco::Event::EventType)'
Logging.o: In function _GLOBAL__sub_I__ZN7Log11mLogStringsB5cxx11E':
Logging.cpp:88: undefined reference to
Poco::Mutex::Mutex(Poco::Mutex::MutexType)'
Could some one tell me what is the issue ? And what is the meaning of "_GLOBAL__sub_I" ?
Upvotes: 0
Views: 454
Reputation: 1407
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
Upvotes: 3