Re: [Libvir] Errors while running make

Hello, I have tried writing a simple program. I have compiled it with cc xmlist.c -L /usr/src/redhat/BUILD/libvir-0.0.1/src/.libs -lvir -o xmlist But am getting an error on trying after the virConnectOpen call . Any help would be appreciated . Rgds, Dakshina Here is the code :xmlist.c #include <stdio.h> #include <libvir.h> main(){ virConnectPtr conn; int *domids ; int maxids = 20; int numDoms=-1; conn=virConnectOpen(""); if(conn == NULL){ printf("Error : Could not open a connection \n"); return(-1); } numDoms=virConnectListDomains(conn,domids,maxids); printf("The number of domains %d\n",numDoms); printf("The number of domains %d\n", virConnectNumOfDomains(conn)); } cc xmlist.c -L /usr/src/redhat/BUILD/libvir-0.0.1/src/.libs -lvir -o xmlist Daniel Veillard <veillard@redhat.com> wrote: On Tue, Jan 24, 2006 at 08:46:07PM -0800, dasari dakshina wrote:
Hello Daniel, Thanks so much for the info .I downloaded the Xen 3 source and was able to compile without any issues. Is there any link where I can look at simple examples of the API usage ?
not yet, check http://libvir.org/html/libvir-libvir.html Please keep discussion on the list, thanks, Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ --------------------------------- What are the most popular cars? Find out at Yahoo! Autos

Resending my earlier query .. Hello, I have tried writing a simple program. I have compiled it with cc xmlist.c -L /usr/src/redhat/BUILD/libvir-0.0.1/src/.libs -lvir -o xmlist But am getting an error on trying after the virConnectOpen call . Any help would be appreciated . Rgds, Dakshina Here is the code :xmlist.c #include <stdio.h> #include <libvir.h> main(){ virConnectPtr conn; int *domids ; int maxids = 20; int numDoms=-1; conn=virConnectOpen(""); if(conn == NULL){ printf("Error : Could not open a connection \n"); return(-1); } numDoms=virConnectListDomains(conn,domids,maxids); printf("The number of domains %d\n",numDoms); printf("The number of! domains %d\n", virConnectNumOfDomains(conn)); } cc xmlist.c -L /usr/src/redhat/BUILD/libvir-0.0.1/src/.libs -lvir -o xmlist __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

On Tue, Jan 31, 2006 at 08:40:47PM -0800, dasari dakshina wrote:
Resending my earlier query .. Hello, I have tried writing a simple program. I have compiled it with cc xmlist.c -L /usr/src/redhat/BUILD/libvir-0.0.1/src/.libs -lvir -o xmlist But am getting an error on trying after the virConnectOpen call .
First update to 0.0.2, there is just too many fixes from 0.0.1 ! Second make sure you have access rights see point 3 of the installation FAQ http://libvir.org/FAQ.html#Installati Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Hello Daniel, I have upgraded to the newer library and have the access rights ( I am running as root and have followed steps stated in the installation manual). I am still facing the same issue . What am I doing wrongly ? I have simply compiled the code as cc -lvir xmlist.c -o xmlist Thanks . Dakshina --- Daniel Veillard <veillard@redhat.com> wrote:
On Tue, Jan 31, 2006 at 08:40:47PM -0800, dasari dakshina wrote:
Resending my earlier query .. Hello, I have tried writing a simple program. I have compiled it with cc xmlist.c -L /usr/src/redhat/BUILD/libvir-0.0.1/src/.libs -lvir -o xmlist But am getting an error on trying after the virConnectOpen call .
First update to 0.0.2, there is just too many fixes from 0.0.1 ! Second make sure you have access rights see point 3 of the installation FAQ http://libvir.org/FAQ.html#Installati
Daniel
-- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

On Wed, Feb 01, 2006 at 03:04:00AM -0800, dasari dakshina wrote:
Hello Daniel, I have upgraded to the newer library and have the access rights ( I am running as root and have followed steps stated in the installation manual). I am still facing the same issue . What am I doing wrongly ? I have simply compiled the code as cc -lvir xmlist.c -o xmlist
Grab the example and see if it works for you http://libvir.org/examples/info1.c Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Hello Daniel, It worked .Thanks for all the help. --Dakshina --- Daniel Veillard <veillard@redhat.com> wrote:
On Wed, Feb 01, 2006 at 03:04:00AM -0800, dasari dakshina wrote:
Hello Daniel, I have upgraded to the newer library and have the access rights ( I am running as root and have followed steps stated in the installation manual). I am still facing the same issue . What am I doing wrongly ? I have simply compiled the code as cc -lvir xmlist.c -o xmlist
Grab the example and see if it works for you http://libvir.org/examples/info1.c Daniel
-- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
participants (2)
-
Daniel Veillard
-
dasari dakshina