Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - C and C++ Programming » Tutorial: Build an Application Using Embedded SQL

Lesson 1: Create the UltraLite database Next Page

Lesson 2: Configure eMbedded Visual C++

The following procedure configures eMbedded Visual C++ for UltraLite development. This procedure has been tested on version 4.0 of that product; the process is similar for other versions.

To configure eMbedded Visual C++ for UltraLite development
  1. Start Microsoft eMbedded Visual C++.

    From the Start menu, choose All Programs > Microsoft eMbedded Visual C++ 4.0 > eMbedded Visual C++ 4.0

  2. Configure eMbedded Visual C++ to search the appropriate directories for embedded SQL header files and UltraLite library files.

    1. Choose Tools > Options.

      The Options dialog appears.

    2. Click the Directories tab.

    3. For each combination of target platform and CPU:

      • Choose Include Files from the Show Directories for dropdown list. Use the Browse button to include the \h directory located in the SQL Anywhere installation directory, so that the embedded SQL header files are accessible.

      • Choose Library Files from the Show Directories for dropdown list. Include the UltraLite \lib directory, located in a platform-specific directory. For example, for the Pocket PC 2002 emulator, specify the following (do not use the environment variable literally; use the full path name):

    4. Click OK.

  3. Configure the project-level settings for this UltraLite tutorial project:

    1. Right-click esql files and select Settings.

      The Project Settings dialog appears.

    2. Select the appropriate platform under the Settings For dropdown list.

    3. Click the Link tab and add the appropriate runtime library to the Object/Library Modules box:

      Specify ulbase.lib

      For static UltraLite linked library specify ulrt.lib

      For dynamic UltraLite link library specify ulimp.lib

      Using UltraLite library or dynamic link library

      Depending on the platform, your application may use the static UltraLite library (ulrt.lib) or the UltraLite dynamic link library (DLL). If you elect to use the DLL, you must copy the appropriate .dll file to the device and you must set UL_USE_DLL as a C/C++ Preprocessor definition.

      For example, for the WCE ARM platform, copy install-dir\ultralite\ce\arm\ulrt10.dll to the Windows folder of the ARM-based CE device. For the WCE x86 (emulator) platform, copy install-dir\ultralite\ce\386\ulrt10.dll to the Windows folder on the emulator device.

      Using the static library means that the application is not dependent on the presence of other files and may make distribution and deployment of the application easier.