[libvirt] Problems in using Storage APIs in libvirt

Hi, I am getting the following the error when I try to use ANY storage related APIs. undefined reference to '<method name>' for example, undefined reference to virConnectListStoragePools. I checked in the libvirt.h and it has the method definition. I checked the libvirt.c and it has the implementations. I can not figure out why I get this error. I could use APIs related the network, for example virConnectListNetworks. Where could I have gone wrong and what are the work-arounds to solve them? I am using SLES 10 SP2. Thanks in advance, Amudhan.

Amudhan Gunasekaran wrote:
Hi,
I am getting the following the error when I try to use ANY storage related APIs.
undefined reference to '<method name>' for example,
undefined reference to virConnectListStoragePools.
I checked in the libvirt.h and it has the method definition. I checked the libvirt.c and it has the implementations. I can not figure out why I get this error. I could use APIs related the network, for example virConnectListNetworks. Where could I have gone wrong and what are the work-arounds to solve them?
I am using SLES 10 SP2.
This probably means that libvirtd and/or virsh is still using the old copy of the library. If you have a libvirt package installed, and then you built the the CVS libvirt by hand, the CVS version probably got installed somewhere to /usr/local/lib, which is in the search path after where libvirt is probably installed to /usr/lib. Try removing your libvirt package and doing a "make install" in the CVS version; you should then have everything matching up. Chris Lalancette
participants (2)
-
Amudhan Gunasekaran
-
Chris Lalancette