DimgMain.c

/* See Creating a new Image Type - An Example for details */

 #include <tcl.h>
 #include <tk.h>
 #include "DimgImage.h"

 #ifdef _MSC_VER
   #pragma comment (lib, "Tcl84.lib")
   #pragma comment (lib, "Tk84.lib")
 #endif


 Tcl_AppInit(Tcl_Interp* interp)
 {
   int    status;

   status = Tcl_Init(interp);
   if (status != TCL_OK)
   {
       return TCL_ERROR;
   }

   status = Tk_Init(interp);
   if (status != TCL_OK)
   {
       return TCL_ERROR;
   }

   vRegisterDimg();
   Tcl_EvalFile(interp, "DingDemo.tcl");

   return TCL_OK;
 }

 int main(int argc, char* argv[])
 {
   Tk_Main(argc, argv, Tcl_AppInit);
   return 0;
 }