Tried to create a Win32 project and included the 'VirtualBox.h' header and 'tstVBoxAPIWin.cpp' to the project. Can't create the project, because the linker runs into the following errors:
1>tstVBoxAPIWin.obj : error LNK2001: Nicht aufgelöstes externes Symbol "_CLSID_VirtualBox".
1>tstVBoxAPIWin.obj : error LNK2001: Nicht aufgelöstes externes Symbol "_IID_IVirtualBox".
1>K:\CPP\VirtualBox2-Sample\Debug\VirtualBox2-Sample.exe : fatal error LNK1120: 2 nicht aufgelöste externe Verweise.
How can i integrate those symbols?
C++ sample with Visual Studio 2008
Foud it:
1. Fire up your favorite C++ compiler (I use the free VC++ 9.0 Express edition) and create a Win32 console project.
2. Add the sdk\samples\API\tstVBoxAPIWin.cpp.
3. Add sdk\include to the INCLUDE path.
4. Don't forget to also add sdk\lib\VirtualBox_i.c to your sources since this file contains all the generated COM interfaces for VirtualBox.
5. Add sdk\lib to your linker path .
6. Run a build.
1. Fire up your favorite C++ compiler (I use the free VC++ 9.0 Express edition) and create a Win32 console project.
2. Add the sdk\samples\API\tstVBoxAPIWin.cpp.
3. Add sdk\include to the INCLUDE path.
4. Don't forget to also add sdk\lib\VirtualBox_i.c to your sources since this file contains all the generated COM interfaces for VirtualBox.
5. Add sdk\lib to your linker path .
6. Run a build.