#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