On Tue, Apr 29, 2025 at 00:44:59 +0000, Andy Smith wrote:
> $ cc -Wall -lxenstat -o foo foo.c
> foo.c:(.text+0x18): undefined reference to `xenstat_init'
> collect2: error: ld returned 1 exit status

The library option (-lxenstat) has to appear *after* any objects that
use it.

cc -Wall -o foo foo.c -lxenstat

Reply via email to