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
On Tue, Apr 29, 2025 at 12:44:59AM +, 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://
On Tue, Apr 29, 2025 at 00:44:59 +, 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.
Hi,
What am I doing wrong here? It's been a couple of years and perhaps this
part of my brain has dissolved.
$ cat foo.c
#include
#include
#include
#include
#include
int main(int argc, char **argv)
{
xenstat_handle *xhandle = NULL;
xhandle = xenstat_init();
if (xhandle == NULL
4 matches
Mail list logo