Compiling the Sample Program

The sample program is written in C++, although the Virtual Disk API also supports C. For compilation to succeed, the correct DLLs or shared objects must be loaded. You can ensure the success of dynamic loading in a variety of ways.

  • Set the path inside the VDDK program.
  • Set the path for the shell being used in Linux or in Visual Studio for Windows.

    For a default installation, the Linux path is /usr/share/doc/vmware-vix-disklib/sample.

  • In Windows, set the Path element in the System Variables.

    To do this in Windows XP, right-click Computer > Properties > Advanced > Environment Variables, select Path in the System Variables lower list, click Edit, and add the path of the VDDK bin directory.

    In Windows 7, right-click Computer > Properties > Advanced System Settings > Environment Variables, select Path in the System Variables list, click Edit, and add the path of the VDDK bin directory.

    C:\Program Files\VMware\VMware Virtual Disk Development Kit\doc\sample\ is the default path.

Note that VDDK loads DLLs by relative path rather than absolute path, so conflicting versions of the DLLs could cause problems.