pkg-config - the goodness



Seems like pkg-config is great tool when we're working with c/c++ codes. Normally we will use

pkg-config vips-cpp --cflags --libs

-pthread -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -L/usr/local/lib -lvips-cpp -lvips -lgobject-2.0 -lglib-2.0


To generate list of flags for compilation. This makes life for developer so much easier. It is very time consuming to get the include and object file linked up.

Next, up is the, which show us list of package installed.


 pkg-config --list-all


This list allows us to plug into code above to generate compilation flags for other libraries.











Comments

Popular posts from this blog

gemini cli getting file not defined error

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

vllm : Failed to infer device type