Re: [libvirt] Compiling a simple code which include libvirt

2012-09-02 Thread Michal Privoznik
On 02.09.2012 09:53, Rahul Bansal wrote: > /* example ex1.c */ > /* compile with: gcc -g -Wall ex1.c -o ex -lvirt */ > #include > #include > #include "include/libvirt/libvirt.h" since you are including this path assume you use -I/path/to/libvirt/source and don't have libvirt installed in your sy

[libvirt] Compiling a simple code which include libvirt

2012-09-02 Thread Rahul Bansal
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 fin