任何人都可以创建一个简单的libvirt程序,它只是启动域

时间:2016-03-17 19:52:00

标签: c++ cloud libvirt

virConnectCreateXML doest似乎对我有用 我创建了以下程序并编译它但似乎有些链接问题或某种问题所以我得到这些错误

FBSDKLoginKit.framework
  

程序:

me.cpp: In function ‘int main(int, char**)’:
me.cpp:21:45: error: ‘virConnectCreateXML’ was not declared in this scope
 dom = virConnectCreateXML(conn, xmlconfig, 0);
                                             ^
me.cpp:24:5: error: return-statement with no value, in function returning ‘int’ [-fpermissive]
     return;
     ^
me.cpp:26:57: error: ‘virDomainName’ was not declared in this scope
 fprintf(stderr, "Guest %s has booted", virDomainName(dom));
                                                     ^
  事先感谢

帮助

1 个答案:

答案 0 :(得分:0)

是的,发现问题的功能 virConnectCreateXML
并通过
virDomainCreateXML函数进行关联