Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Libraries are usually installed in /usr/lib/, /usr/local/lib and their subfolders. Usually these paths are already in LD_PATH, so it's enough to specify -l<libname>
.
Libraries are also often installed along with the pkg-config configuration, so you can use it like this:
gcc -c file.c `pkg-config --cflags <libname>`
gcc file.o -o file `pkg-config --libs <libname>`
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question