Re: [libvirt] Problems using libvirt (linking errors)

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

 



Hi,

  I guess You are missing linking libvirt.
If not, Please check libvirt library by using nm command.

Thanks
Atsushi SAKAI


johannes@xxxxxxxxxx (Johannes Formann) wrote:

> Hello,
> 
> I habe a problem using a recent libvirt-Version (0.4.4) (installed from
> backports.org) in my own programms.
> I had used an older Version a while ago, but I think something might
> have changed in the API(?), since the old code has the same problems
> now.
> 
> I include the headers
> #include <libvirt/libvirt.h>
> #include <libvirt/virterror.h>
> 
> but when linking, I'll get errors like
> XSSserver.o: In function `XSSserver::XSSserverinitializeService(void*)':
> /root/rsplib-2.5.0/rsplib/XSSserver.cc:68: undefined reference to
> `virInitialize'
> /root/rsplib-2.5.0/rsplib/XSSserver.cc:72: undefined reference to
> `virConnectOpen'
> 
> 
> here is the function:
> bool XSSserver::XSSserverinitializeService(void* userData)
> {
>     if ( virInitialize() != 0) {
>         puts("WARNING: vir Initializew failed\n") ;
>         return false;
>     }
>     virCon=virConnectOpen(NULL);
>     if (virCon != NULL ) {
>         return true;
>     }
>     puts("WARNING: Initialisierung misslungen") ;
>     return false;
> }
> 
> Any hints what I've done wrong/how to debug that problem?
> 
> regards  Johannes
> 
> --
> Libvir-list mailing list
> Libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list


--
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]