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 » Developing Applications Using Embedded SQL » Building embedded SQL applications

General build procedure Next Page

Configuring development tools for embedded SQL development


Many development tools use a dependency model, sometimes expressed as a makefile, in which the timestamp on each source file is compared with that on the target file (object file, in most cases) to decide whether the target file needs to be regenerated.

With UltraLite development, a change to any SQL statement in a development project means that the generated code needs to be regenerated. Changes are not reflected in the timestamp on any individual source file because the SQL statements are stored in the reference database.

This section describes how to incorporate UltraLite application development, specifically the SQL preprocessor, into a dependency-based build environment. The specific instructions provided are for Visual C++, and you may need to modify them for your own development tool.

The UltraLite plug-in for Metrowerks CodeWarrior automatically provides Palm Computing Platform developers with the techniques described here. For more information about this plug-in, see Developing UltraLite applications with Metrowerks CodeWarrior.

For a tutorial describing a very simple project, see Tutorial: Build an Application Using Embedded SQL.

SQL preprocessing

The first set of instructions describes how to add instructions to run the SQL preprocessor to your development tool.

To add embedded SQL preprocessing into a dependency-based development tool
  1. Add the .sqc files to your development project.

    The development project is defined in your development tool.

  2. Add a custom build rule for each .sqc file.

  3. Compile the .sqc files, and add the generated .cpp files to your development project.

    You need to add the generated files to your project even though they are not source files, so that you can set up dependencies and build options.

  4. For each generated .cpp file, set the preprocessor definitions.