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 CodeWarrior automatically provides Palm Computing Platform developers with the techniques described here. For more information about this plug-in, see Developing UltraLite applications with CodeWarrior.
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
Add the .sqc files to your development project.
The development project is defined in your development tool.
Add a custom build rule for each .sqc file.
"%SQLANY11%\Bin32\sqlpp.exe" -q -u $(InputPath) $(InputName).cpp |
where SQLANY11 is an environment variable that points to your SQL Anywhere installation directory.
For a full description of the SQL preprocessor command line, see SQL Preprocessor for UltraLite utility (sqlpp).
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.
For each generated .cpp file, set the preprocessor definitions.
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |