An Introduction To Embedded Tk (page 25 of 32)

[Previous Page][Next Page][Table of Contents]

11.4 Compiling Using An Older K&R Compiler

If it is your misfortune not to have an ANSI C compiler, you can still use ET. The source code to et2c is pure K&R C and should work fine under older compilers. The source code to et.o is another matter. To compile the library using an older compiler you need to first give a -K+R option to et2c and then give a -DK_AND_R option to the C compiler:

  et2c -K+R -I/usr/local/lib/tcl -I/usr/local/lib/tk et40.c >et.c
  cc -DK_AND_R -I/usr/include/tcl -I/usr/include/tk -c et.c
When compiling application code with an older compiler, just give the -K+R option to et2c. It is not necessary to give the -DK_AND_R option to the C compiler when compiling objects other than et.c.

[Next Page][Table of Contents]