Overview
| Artifact ID: | 0147a9bfce07355f9a8548b8ef70fd75212a0b1a |
|---|---|
| Ticket: | 633990ffffffffffffffffffffffffffffffffff
tcl.h always makes incorrect #define |
| User & Date: | edwardross on 2002-11-05 19:27:37 |
Changes
- assignee changed to: "kennykb"
- cmimetype changed to: "text/plain"
- comment changed to:
PROBLEM --------------- in tcl.h TCL_STORAGE_CLASS is correctly defined arround line 249 with the following: #undef TCL_STORAGE_CLASS #ifdef BUILD_tcl # define TCL_STORAGE_CLASS DLLEXPORT #else # ifdef USE_TCL_STUBS # define TCL_STORAGE_CLASS # else # define TCL_STORAGE_CLASS DLLIMPORT # endif #endif However later in the same file arround line 1691, it is incorrectly defined as: #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS EXTERN intTcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp)); #endif /* RESOURCE_INCLUDED */ #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT This usually doesn't cause any problems, but if you then try to link with proWrap.h, this incorrect definition of TCL_STORAGE_CLASS means that we can't link. Would also be a problem for linking with static libs rather than dlls (obviously talking about on windows here). Workaround ------------------ Undefine TCL_STORAGE_CLASS before include proWrap.h. Possible Resolution ----------------------------- (1) change the definition at line 249 to: #ifdef __cplusplus # define HEAD_EXTERN extern "C" #else # define EXTERN extern TCL_STORAGE_CLASS #endif #define EXTERN HEAD_EXTERN TCL_STORAGE_CLASS (2) Remove all further defines/undefines for TCL_STORAGE_CLASS at line 1694 etc. (3) change the declaration at line 1694 to: EXTERN_HEAD int Tcl_AppInit _ANSI_ARGS_((Tcl_Interp *interp));
- foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "edwardross"
- subsystem changed to: "40. Dynamic Loading"
- title changed to: "tcl.h always makes incorrect #define"
- type changed to: "Bug"