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 for the Palm OS.
The first set of instructions describes how to add instructions to run the SQL preprocessor to your 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.
The custom build rule should run the SQL preprocessor. In Visual C++, the build rule should have the following command (entered on a single line):
"%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).
Set the output for the command to $(InputName).cpp.
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.
Under General or Preprocessor, add UL_USE_DLL to the Preprocessor definitions.
Under Preprocessor, add $(SQLANY11)\SDK\Include and any other include folders you require to your include path, as a comma-separated list.
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|