I'm having trouble with Poco libraries. I need a simple solution to make the compilation easier. Is there any pkg-config
file for Poco library to use it into our make files? Or any alternative solution?
Currently I use Ubuntu GNU/Linux.
I'm trying to use poco libraries in my app, but I don't know how to link Poco libraries to it. In fact I don't know how many libraries should be linked against the app. I want to know if there is an easy way to do it, such as using pkg-config
files, as we do with gtkmm
, for example:
g++ prog.cc `pkg-config --gtkmm-2.4 --libs --cflags` -o prog
and the pkg-config
program appends appropriate libs and header files to our command.
On ubuntu 16.04 you'll first need to install Poco libraries accordingly, that is done as follows:
sudo apt install libpoco-dev
Then you'll need to add the proper instructions to the linker, it will depend on the includes you have, for example if you used
#include <Poco/Net/MailMessage.h>
You'll need the following switches:
-lPocoNet -lPocoFoundation
ej:
g++ main.cpp -Wall -std=c++11 -o pocotest -lPocoNet -lPocoFoundation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With