Compiling dbCGI

For Unix

Due to the complexities involved in the number of databases supported by dbCGI, and the fact that each database requires different libraries on different operating systems, building dbCGI may not be as easy as building some other software. It is not practcal to produce a simple "configure" script that will figure everything out. That means you may need to make modifications to the dbCGI makefiles to get it to build in your environment.

To attempt to build dbCGI, first run the build script that you will find in the top level of the dbCGI directory.

$ sh build

sh build

1) CA OpenIngres
2) DB2
3) DB2 on OS/390
4) Informix
5) Oracle 6
6) Oracle 7
7) Oracle 8
8) Oracle 9 or higher (*)
9) Postgres (*)
10) Progress SQL92 (Progess 9 or higher) (*)
11) Progress SQL89 (7.x, 8.x, 9.x) (*)
12) Red Brick
13) Sybase

Select database or 0 to continue:

The build script will ask some questions about the databases you want to build dbCGI for and where those databases are installed on your system. It will then attempt to guess the right compilers and libraries to use, and run "make".

If all goes well, a copy of the dbCGI executable will be found in the bin directory underneath the dbCGI directory. You should copy this file to the cgi-bin (or equivalent) directory on your system.

Special case - Progress SQL89

If you are building dbCGI for Progress SQL89 the build procedure will invoke PROBUILD. In Probuild, you should chose the following options:

  1. On the "Install Link Script Into" screen, type . then hit "tab" and "enter".
  2. On the "Product List" screen, select "ESQL/C LARGE CLIENT (FULL)", then hit "tab" and "enter".
  3. On the "Link Script/Executable Names" screen, hit "tab", "tab", "enter".
  4. On the "Configurable Elements" screen, select the components you will be using (we recommend "TCP-IP Network Protocol" in all cases), then hit "tab", "enter".
  5. On the "Object Files" screen, type HERE in the first field, then hit "tab" until you get to the "Continue" button, then hit "enter"
  6. On the "Product List" screen, hit "tab", "tab", "enter"
  7. On the "Install Link Script Into" screen, hit "tab", "tab", "enter"

For Windows

Unless you intend to modify dbCGI you are unlikely to need to compile it for Windows. A pre-compiled binary for dbCGI for ODBC under Windows is downloadable from

If you are modifying dbCGI, we presume you can figure out how to build it - our own build procedures are unlikely to work for you unless you use the same tools and environment we use. The source files you will need to compile to produce an executable are dblib/odbc.c and dbcgi/*.c.