[Libguestfs] The usage if libguestfs

Richard W.M. Jones rjones at redhat.com
Mon Jun 29 09:47:12 UTC 2015


On Sun, Jun 28, 2015 at 04:32:55AM +0800, fu lirong wrote:
> HI  all:
> my problem is :
> I want to use libguestfs on other project.
> 
> if I just run a test C programm It works well
> just run : cc prog.c -o prog -lguestfs -I
> /usr/libguestfs/libguestfs-1.28.10/src/

> - LIBS =  -lvirt
> -LDFLAGS =
> +LDFLAGS = /usr/lib
> +LIBS = -lguestfs -lvirt

You may need:

  +LDFLAGS = -L/usr/libguestfs/libguestfs-1.28.10/libs

or maybe:

  +LDFLAGS = -L/usr/libguestfs/libguestfs-1.28.10/libs/.libs

depending on how or whether you have installed libguestfs.  Note use
of the '-L' option to set the linker search path.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list