Contents Index Lesson 4: Write the application source code Lesson 6: Add synchronization to your application pdf/preface.pdf

UltraLite User's Guide
  Tutorial: Build an Application Using the C++ API

Lesson 5: Build and run your application


You can compile and link your application in the development tool of your choice. In this section, we describe how to compile and link using Visual C++; if you are using one of the other supported development tools, modify the instructions to fit your tool.

  1. Start Microsoft Visual C++ from your desktop in the standard fashion.

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

    Select Tools > Options and click on the Directories tab. In the Show Directories For dropdown list, choose Include Files. Include the following directory, so that the header files can be accessed.

    C:\Program Files\Sybase\SQL Anywhere 9\h

    On the same tab, select Library Files under the Show Directories For dropdown menu. Include the following directory so that the UltraLite library files can be accessed.

    C:\Program Files\Sybase\SQL Anywhere 9\ultralite\win32\386\lib

    Click OK to submit the changes.

  3. Create a project named APITutorial (it should be the same name as the directory you have used to hold your files).

  4. Configure the project settings.

  5. Add sample.cpp and ProductPubAPI.cpp to the project.

  6. Add the file containing the base classes for the UltraLite API to the project.

  7. Compile and link the application.

  8. Ensure that the application can locate the UltraLite runtime library.

  9. Run the application.

    A command prompt window appears and displays the prices of the products in the product table.

You have now built and run a simple UltraLite application. The next step is to add synchronization to your application.


Contents Index Lesson 4: Write the application source code Lesson 6: Add synchronization to your application pdf/preface.pdf