• Re: Missing shared library =?utf-8?Q?symbo?= =?utf-8?B?bHPigKY=?= that

    From Andy Smith@21:1/5 to Andy Smith on Tue Apr 29 03:10:01 2025
    On Tue, Apr 29, 2025 at 12:44:59AM +0000, Andy Smith wrote:
    What am I doing wrong here? It's been a couple of years and perhaps this
    part of my brain has dissolved.

    Yes, it was just a missing "-c" from the arguments. This works:

    $ cc -Wall -c foo.c -o foo -lxenstat

    Thanks,
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Smith@21:1/5 to Greg Wooledge on Tue Apr 29 03:10:01 2025
    Hi,

    On Mon, Apr 28, 2025 at 08:59:13PM -0400, Greg Wooledge wrote:
    The library option (-lxenstat) has to appear *after* any objects that
    use it.

    cc -Wall -o foo foo.c -lxenstat

    Ah, okay. My addition of -c was just coincidence then, and it was the reordering that fixed it.

    Thanks!
    Andy

    --
    https://bitfolk.com/ -- No-nonsense VPS hosting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)