Re: Compile time error in event-test.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10.01.2014 11:15, Avanti Ajay wrote:
> 
> Hi...
> 
> I am trying to compile the event-test.c code of the libvirt package. I
> am getting this error :
> I know it is a loader problem. Do I need to install any binaries?
> 
> administrator@administrator-desktop:~/Desktop/libvirt/examples/domain-events/events-c$
> gcc event-test.c -o event -lvirt
> /tmp/ccHd7ZUD.o: In function `main':
> event-test.c:(.text+0xac9): undefined reference to
> `virConnectRegisterCloseCallback'
> collect2: ld returned 1 exit status
> 
> 
> Thanks
> 
> Avanti
> 

I assume your system libvirt is too old. The
virConnectRegisterCloseCallback() API was introduced in the 0.10.0
release. Upgrade and you should be able to compile again.

BTW, since you already have a libvirt sources, why not build them? I
mean, the examples won't contain any API from the future, so your
sources already define the Register API. You can build the sources by
running:

./autogen.sh --system && make

to install run:

sudo make install


Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]