C programming task overview

About this task

After you generate code with BladeSmith, complete these general tasks to finish your DataBlade® module code:

Procedure

  1. Open the project.dsw file in Microsoft™ Visual C++.
    You can do this from within BladeSmith. See Opening the project file in Visual C++ for instructions.
  2. Add code to these source code files to enable your routines to function as you intend:
    Table 1. Source code files that enable your routine
    File name What it adds
    Opaque.c Adds functionality for opaque data type support routines, as necessary. See Edit opaque type support routines in opaque.c for instructions.
    statistics.c Adds functionality for statistics support routines, as necessary. See Edit statistics routines in statistics.c for instructions.
    udr.c Adds functionality for user-defined routines, cast support functions, and aggregates. See Edit routines in udr.c for instructions.
  3. Compile and link your source code files by using a makefile or Visual C++ workspace file generated by BladeSmith.
    See Compile DataBlade module code for instructions.

Results

To avoid merging conflicts when you regenerate your code, add code only in areas marked by TO DO: comments or after the generated code. If you do modify code outside the designated areas, after you regenerate you might have two copies of the routine: the one you modified and the one BladeSmith generated. Although your changes remain, you must resolve conflicts in the two pieces of code.