[libvirt] Compiling a simple code which include libvirt

Rahul Bansal gtg.bansal at gmail.com
Sun Sep 2 07:53:09 UTC 2012


I am trying to compile this code by two methods but it shows error
1) Without -lvirt option
*/tmp/ccHGRn8q.o: In function `main':
ex1.c:(.text+0x15): undefined reference to `virConnectOpen'
ex1.c:(.text+0x57): undefined reference to `virConnectClose'*

2) with -lvirt option
*/usr/bin/ld: cannot find -lvirt
collect2: ld returned 1 exit status*

Someone help me!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120902/07361745/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex1.c
Type: text/x-csrc
Size: 377 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120902/07361745/attachment-0001.bin>


More information about the libvir-list mailing list