UltraLite User's Guide
Developing Embedded SQL Applications
Preprocessing your embedded SQL files
If all your embedded SQL code is contained in one source file, you may use the following technique to preprocess this code using the SQL preprocessor and generate the supplementary code in a single step. In this case, the preprocessor automatically runs the UltraLite generator, which writes additional code that describes your database schema and implements the SQL used in your application.
To preprocess an embedded SQL source file (one file only)
Specify no project name when you run sqlpp, the SQL preprocessor. When invoked without a project name, the preprocessor automatically runs the UltraLite generator and appends the additional C/C++ code, which implements your application database. A single C/C++ source file is generated.
Do not run the UltraLite generator explicitly.
Your application contains only one embedded SQL source file, called store.sqc. You can process this file using the following command. Do not specify a project name. This command causes the SQL preprocessor to write the file store.c.
sqlpp -c "uid=dba;pwd=sql" store.sqc
In addition, the preprocessor automatically runs the UltraLite analyzer, which generates more C/C++ code to implement your application database. This code is automatically appended to the file store.c.
If the analyzer cannot be invoked, an error results. For more information, see Error on starting the analyzer.
For a list of the parameters to sqlpp, see The SQL preprocessor.