Question

Just installed librsync using apt-get install librsync-dev on ubuntu. I can link other libraries like this pkg-config --libs --cflags glib-2.0 but I can't find librsync using pkg-config. How can I link it?

UPDATE: I very new to C and all this compiling linking stuff. Just learned how to find and link using pkg-config. But this librsync seems to be developed using different thing.

Was it helpful?

Solution

Your problem is not with C. The problem is most likely due to librsync NOT providing a package config file. Try:

pkg-config --list-all | grep -i rsync

If you get no response, librsync has no pkgconfig file available to the system. Instead of using pkg-config to link librsync, just add -lrsync to your gcc command line. E.g.:

gcc -Wall -o mynewprog mynewprog.c -lrsync
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top