reza reza - 12 days ago 5
C++ Question

"make" command for rcssmonitor project

I'm installing rcssmonitor for soccer2d sim and there is a problem in making this project, here's the error:

/usr/bin/ld: cannot find -lfontconfig
collect2: error: ld returned 1 exit status
Makefile:477: recipe for target 'rcssmonitor' failed
make[2]: *** [rcssmonitor] Error 1
make[2]: Leaving directory '/rccserver/rcssmonitor/src'
Makefile:382: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/rccserver/rcssmonitor'
Makefile:322: recipe for target 'all' failed
make: *** [all] Error 2

I downloaded the latest version from sourceforge
how can I fix it?


In a fresh enough Debian/Ubuntu the required package is called libfontconfig1-dev. Perform apt install libfontconfig1-dev (almost) as @krzaq suggested.

But likely you will need other development packages as well. If linker blames on -lsome, then you need a shared library, usually located in /usr/lib or /usr/lib32 (there could be other variations like /lib, /usr/lib64 etc). Perhaps the easiest way to understand what package a given file belongs to is to install apt-file package and then to query required libraries.