Freigeben über


Building XmlLite Applications

 

For simplicity and clarity, the XmlLite samples are constructed as C++ Win32 console application projects in Microsoft Visual Studio 2005.

The procedure below outlines the steps to get ready to build an XmlLite example.

Procedures

To create a new Win32 console application project:

  1. Start Visual Studio 2005.

  2. From the File menu, select New, and then select Project. The New Project dialog box will open. For Project types, select Visual C++ / Win32. For Templates, select Win32 Console Application. Then type the name of the project in the Name field. For the project Location field, either accept the default setting or choose another location (such as c:\examples\HowDoI). Click OK.

  3. The Win32 Application Wizard will start. You do not have to change any options. Click Finish.

Next, set up the include directory for Visual Studio:

  1. From the Tools menu, select Options.

  2. In the Options dialog box, expand Projects and Solutions. Select VC++ Directories.

  3. Select Include files in the Show directories for dropdown box.

  4. Click the New Line button, and add a new line to the list of directories.

  5. Browse to the directory that contains the XmlLite header file. For XmlLite, the directory is %sdxroot%/sdk/inc, where %sdxroot% is the root directory where you installed the SDK. If you do not know the directory where xmllite.h is installed, you can search for it under the Program Files directory.

  6. Click OK.

Set up the lib directory for Visual Studio:

  1. From the Tools menu, select Options.

  2. In the Options dialog box, expand Projects and Solutions. Select VC++ Directories.

  3. Select Library files in the Show directories for dropdown box.

  4. Click the New Line button, and add a new line to the list of directories.

  5. Browse to the directory that contains the XmlLite libraries. For XmlLite, the directory is %sdxroot%/sdk/lib, where %sdxroot% is the root directory where you installed the SDK. If you do not know the directory where xmllite.lib is installed, you can search for it under the Program Files directory.

  6. Click OK.

  1. In the Solution Explorer, right click on the project and select Properties.

  2. In the tree, expand Configuration Properties, and then expand Linker.

  3. Under Linker, click on Input. Enter xmllite.lib for Additional Dependencies.

  4. Click OK.

Now you are ready to add source and header files to the project. Each sample includes the necessary source and header files.

See Also

XmlLite Programmer's Guide
XmlLite Samples
Installing XmlLite