Contents Index Single-file build process Configuring development tools for embedded SQL development pdf/preface.pdf

UltraLite User's Guide
  Developing Embedded SQL Applications
    Building embedded SQL applications

Build process for UltraLite embedded SQL applications


The build process for embedded SQL UltraLite applications has two steps:

  1. Preprocess each embedded SQL file (.sqc) to produce .cpp files.

    You must supply a project name on the preprocessor command line and use the same project name each time you preprocess an embedded SQL source file.

    For information about projects, see Creating an UltraLite project.

  2. Run the UltraLite generator to generate the database code.

Sample code 

You can find a makefile that uses this process in the Samples\UltraLite\ESQLSecurity directory. You require the separately-licensable transport-layer security option to build that sample.

For information on obtaining the transport-layer security option, see the card in your SQL Anywhere package or see http://www.sybase.com/detail?id=1015780.

To build an UltraLite embedded SQL application

  1. Start the Adaptive Server Anywhere personal database server, specifying your reference database.

  2. Preprocess each embedded SQL source file using the SQL preprocessor, specifying the project name. This step relies on your reference database and on the database server.

    For more information, see Preprocessing your embedded SQL files.

  3. Run the UltraLite generator. The generator uses the analyzer, inside your reference database, to analyze information collected while pre-processing your embedded SQL files. The analyzer prepares extra code and the generator writes out a new C source file. This step also relies on your reference database and database server.

    For more information, see Generating the UltraLite data access code.

  4. Compile each C or C++ source file for the target platform of your choice. Include

  5. Link all these object files, together with the UltraLite runtime library.

The following diagram depicts the procedure for building your own UltraLite database application. In addition to your source files, you need to create a reference database. As explained below, this database plays dual roles, acting as an instance of the schema used in your application and storing information that the UltraLite analyzer needs to implement your database.

Each section remaining in this chapter describes one step in writing or building your application.

For more information about the SQL preprocessor, see Preprocessing your embedded SQL files.

For more information on the generator, see Generating the UltraLite data access code.


Contents Index Single-file build process Configuring development tools for embedded SQL development pdf/preface.pdf