I’m writing a software that depends on the Poco c++ library. I can manage to compile the library on both Ubuntu and Windows, but only as static. That’s fine since I want to use it statically. However, when I try to compile the program that depends on the libraries, I get an error similar to this (freely translated) :
Poco/RegularExpression.h: No such file or directory.
However, when I also explicitly tells the compiler where to look for the library’s header files with the -I switch I get the following error instead (but maybe 20-30 similar lines) :
Undefined reference to (pthread_mutex...)
I’ve tried with a lot of different combinations, both directly with g++, and by using makefiles.
Am I supposed to include the paths to the libraries’ header files, or have I somehow not succeeded to compile the libraries properly?
If I should include the paths, how can I get rid of the “undefined reference” error?
I’m pretty new with c++ programming so bear with me.
Thanks, Robert
This is very common error, I, too, suffer from it every now and then.