Quantcast
Channel: VMware Communities : Popular Discussions - VIX API
Viewing all articles
Browse latest Browse all 34639

Sample Code to test VIX install

$
0
0

#include "vix.h"

#include <stdlib.h>

#include <stdio.h>

VixHandle hostHandle = VIX_API_VERSION;

VixHandle jobHandle = VIX_INVALID_HANDLE;
VixError err;
jobHandle = VixHost_Connect(VIX_API_VERSION,
VIX_SERVICEPROVIDER_VMWARE_SERVER,
host, // hostName
0, // hostPort
user, // userName
password, // password,
0, // options
VIX_INVALID_HANDLE, // propertyListHandle
NULL, // callbackProc
NULL); // clientData
err = VixJob_Wait(jobHandle,
VIX_PROPERTY_JOB_RESULT_HANDLE,
&hostHandle,
VIX_PROPERTY_NONE);
if (VIX_OK != err) {
// Handle the error...
Vix_ReleaseHandle(jobHandle);
VixHost_Disconnect(hostHandle);
}
printf("Connected to local host.\n");
when i compile the code
it nootify

/home/david/Development/workspace/VIXTest/Debug/../src/Connection.c:21: undefined reference to `VixHost_Connect'

/home/david/Development/workspace/VIXTest/Debug/../src/Connection.c:31: undefined reference to `VixJob_Wait'

/home/david/Development/workspace/VIXTest/Debug/../src/Connection.c:37: undefined reference to `Vix_ReleaseHandle'

/home/david/Development/workspace/VIXTest/Debug/../src/Connection.c:38: undefined reference to `VixHost_Disconnect'

I know that is mean the function is not defined.

but that should be defined as the api.......

Any can tell me how to solution the problem???

Thank


Viewing all articles
Browse latest Browse all 34639

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>