[ale] Compiling a g++ package...

Thomas B. Turpin tturpin at bird.phys.clemson.edu
Mon Apr 22 07:41:13 EDT 1996


This is a multi-part message in MIME format.

--------------E808191EE55870612F6BE7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello friends,

This weekend I tried to install tk4.0/tcl7.4 in order to get a
WYSIWYG word processor called cicero installed on my linux1.3.20
system with basic slackware installation.  Cicero needs to be
able to use namespace-something-or-other with tk/tcl.  I get the 
following error when I try to do the compile of cicero:

g++ -O2 -m486    -I/usr/X11R6/include  -I./include -Dlinux -D__i386__
-D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE     -c gui.cc -o
gui.o
In file included from cicero.hh:24,
                 from gui.cc:3:
/usr/include/tcl/itcl.h:64: warning: ANSI C++ forbids declaration
`Itcl_Namespace' with no type or storage class
/usr/include/tcl/itcl.h:64: parse error before `;'
/usr/include/tcl/itcl.h:76: warning: ANSI C++ forbids declaration
`Itcl_Stack' with no type or storage class
/usr/include/tcl/itcl.h:76: parse error before `;'
/usr/include/tcl/itcl.h:89: `Itcl_Namespace' was not declared in this
scope
/usr/include/tcl/itcl.h:89: parse error before `)'
/usr/include/tcl/itcl.h:91: type specifier omitted for parameter
/usr/include/tcl/itcl.h:91: parse error before `*'
/usr/include/tcl/itcl.h:100: type specifier omitted for parameter
/usr/include/tcl/itcl.h:100: parse error before `*'
make: *** [gui.o] Error 1

The itcl.h file is as attached to this message.  Thanks in advance.

-- 
-----------------------------------------------------------------------
Thomas B. Turpin	tturpin at bird.phys.clemson.edu 
(aka Bird) http://www.clemson.edu/~tturpin/
-----------------------------------------------------------------------

--------------E808191EE55870612F6BE7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="itcl.h"

/*
 * ------------------------------------------------------------------------
 *      PACKAGE:  [incr Tcl]
 *  DESCRIPTION:  Object-Oriented Extensions to Tcl
 *
 *  [incr Tcl] provides object-oriented extensions to Tcl, much as
 *  C++ provides object-oriented extensions to C.  It provides a means
 *  of encapsulating related procedures together with their shared data
 *  in a local namespace that is hidden from the outside world.  It
 *  promotes code re-use through inheritance.  More than anything else,
 *  it encourages better organization of Tcl applications through the
 *  object-oriented paradigm, leading to code that is easier to
 *  understand and maintain.
 *  
 *  ADDING [incr Tcl] TO A Tcl-BASED APPLICATION:
 *
 *    To add [incr Tcl] facilities to a Tcl application, modify the
 *    Tcl_AppInit() routine as follows:
 *
 *    1) Include this header file near the top of the file containing
 *       Tcl_AppInit():
 *
 *         #include "itcl.h"
 *
 *    2) Within the body of Tcl_AppInit(), add the following lines:
 *
 *         if (Itcl_Init(interp) == TCL_ERROR) {
 *             return TCL_ERROR;
 *         }
 * 
 *    3) Link your application with libitcl.a
 *
 *    NOTE:  An example file "tclAppInit.c" containing the changes shown
 *           above is included in this distribution.
 *  
 * ========================================================================
 *  AUTHOR:  Michael J. McLennan       Phone: (610)712-2842
 *           AT&T Bell Laboratories   E-mail: michael.mclennan at att.com
 *     RCS:  $Id: itcl.h,v 1.2 1995/09/13 20:39:17 mmc Exp $
 * ========================================================================
 *             Copyright (c) 1993-1995  AT&T Bell Laboratories
 * ------------------------------------------------------------------------
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 */
#ifndef ITCL_H
#define ITCL_H

#include "tcl.h"

#define ITCL_VERSION "2.0"
#define ITCL_MAJOR_VERSION 2
#define ITCL_MINOR_VERSION 0

/*
 *  Data structures defined opaquely in this module.
 *
 *  NOTE:  Any change to the structures below must be mirrored
 *         in their "real" definition in itclInt.h.
 */
typedef struct Itcl_Class {
    char *name;                   /* class name */
    Tcl_Interp *interp;           /* interpreter that manages this info */
    Itcl_Namespace namesp;        /* namespace representing class scope */
    Tcl_Command accessCmd;        /* access command for creating instances */
} Itcl_Class;

typedef struct Itcl_Object {
    Itcl_Class *cdefn;            /* most-specific class */
    Tcl_Command accessCmd;        /* object access command */
} Itcl_Object;


typedef struct Itcl_HierIter {
    Itcl_Class *current;          /* current position in hierarchy */
    Itcl_Stack stack;             /* stack used for traversal */
} Itcl_HierIter;


/*
 *  Exported functions (public interface to this package)
 */
EXTERN int Itcl_Init _ANSI_ARGS_((Tcl_Interp* interp));

EXTERN int Itcl_RegisterC _ANSI_ARGS_((Tcl_Interp* interp,
    char *name, Tcl_CmdProc *proc));
EXTERN Tcl_CmdProc* Itcl_FindC _ANSI_ARGS_((char *name));

EXTERN int Itcl_IsClass _ANSI_ARGS_((Itcl_Namespace ns));
EXTERN int Itcl_FindClass _ANSI_ARGS_((Tcl_Interp* interp, char* path,
    Itcl_Namespace* nsPtr));

EXTERN int Itcl_FindObject _ANSI_ARGS_((Tcl_Interp* interp,
    char* name, Itcl_Object** objPtr));
EXTERN int Itcl_IsObject _ANSI_ARGS_((Tcl_Command cmd));
EXTERN int Itcl_ObjectIsa _ANSI_ARGS_((Itcl_Object* obj,
    Itcl_Class* cdefn));

EXTERN int Itcl_GetClassContext _ANSI_ARGS_((Tcl_Interp* interp,
    Itcl_Namespace* classNsPtr, Itcl_Class** cdefnPtr,
    Itcl_Object** odefnPtr));

EXTERN void Itcl_InitHierIter _ANSI_ARGS_((Itcl_HierIter *iter,
    Itcl_Class *cdefn));
EXTERN void Itcl_DeleteHierIter _ANSI_ARGS_((Itcl_HierIter *iter));
EXTERN Itcl_Class* Itcl_AdvanceHierIter _ANSI_ARGS_((Itcl_HierIter *iter));

#endif

--------------E808191EE55870612F6BE7--






More information about the Ale mailing list