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

[Xen-devel]How to compile xen program in c++?


  • To: Xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: 张建锋 <zjf.ha2010@xxxxxxxxx>
  • Date: Sat, 9 Oct 2010 11:26:53 +0800
  • Cc:
  • Delivery-date: Fri, 08 Oct 2010 20:27:56 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=dX9fTE5gpulJ91zGRRJe84uv9bewDZgO/SSqcJQ0ZG37GENAkFYBNRngOhiKxs/n8G AssKY/ae4Al2eOrq9dC9l0snw7ZHYQWwvTec4fUzsFrRw14pgtfc4dk5NH62EIKpWGpo SvdIaxGcOoMRyCpw6Gu7FnzHpGB34W2uz+ofQ=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

I want to type program with xen,but there some error.

xentest.cpp:

/************************************************
#include <xenctrl.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
    int value=xc_interface_open();
   
    fprintf(stderr, "%d",value);

    return 0;
}
***********************************************/

I use cmd:
g++ xenctest.cpp -o xenctest0 -lxenctrl

Compiler output:
/tmp/ccR8dCnr.o: In function `main':
xenctest.cpp:(.text+0x10): undefined reference to `xc_interface_open()'
collect2: ld return 1

I google this ,but I've no idea.

How can I do?

Thanks very much.





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.