Hi,ALL:
I compiled the libvirt-0.9.11 source code with mingw on windows according to the
website:
https://github.com/photron/msys_setup
Then I wrote a simple test case ,as below:
#include <stdio.h>
#include <stdlib.h>
#include "libvirt/libvirt.h"
int main(int argc,char **argv)
{
virConnectPtr conn;
conn = virConnectOpen("qemu+tcp://192.168.1.6/system");
if (conn = NULL)
{
fprintf(stderr,"Failed to open connection to
qemu+tcp://192.168.1.6/system");
return 1;
}
virConnectClose(conn);
return 0;
}
When linked to the dll just compiled , it came out with error :
NOTE: you should run 'diskperf -y' to enable the disk statistics
libvir: RPC error : Unable to set close-on-exec flag: No such file or directory
libvir: error : invalid connection pointer in virConnectClose
When using gdb to debug the testcase , break the function virConnectOpen , then step ,the
error info was:
Program received signal ?,Unknown signal.
0x7c92e4ff in ntdll!LdrAlternateResourcesEnabled ()
from C:\WINDOWS.0\system32\ntdll.dll
Any suggestion would be appreciated !
Best Regards!
xuteng via foxmail