For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

TclTk 8.4

Anonymous's picture

When building OpenCASCADE 5.2.3 against Tcl/Tk versions >= 8.4, the following source changes are required. Note: I do not use TclTk functionality explicitly and can only state that it does compile.

1) Change "src/Draw/Draw_Interpretor.cxx" method "CommandCmd()" prototype on line 28 to expect "const char* argv[]" instead of "char* argv[]" as is defined by Tcl 8.4. Also change "char* const cc" to "const char* cc" on line 45 to agree with Tcl return type for Tcl_GetVar().

2) Change "src/Draw/Draw_VariableCommands.cxx" method "tracevar()" on line 647 to expect "const char*, const char*" instead of "char*, char*" as is defined by Tcl 8.4 prototype. Similarly, cast the return of Tcl_SetVar() to "(const Standard_CString)" on line 691.

3) Declare "promptCmd" as "const char*" to match return type of Tcl_GetVar() in method "Prompt()" of "src/Draw/Draw_Window.cxx", line 47.

4) To satisfy call to Tcl_CreateCommand(), line 61 in src/WOKTCL/WOKTCL_Interpretor.cxx, change prototype of DefaultCommand, line 19 of "inc/WOKTCL_DefaultCommand.hxx" and line 48 of "src/WOKTCL/WOKTCL_DefaultCommand.cxx", to match Tcl prototype making the arg "const char* argv[]". This also requires the casts of "argv" to "(char** const&)" and "(char*)" on lines 71 and 91 respectively of "src/WOKTCL/WOKTCL_DefaultCommand.cxx".

5) To satisfy call to Tcl_CreateCommand(), line 159 in "src/WOKTclTools/WOKTclTools_Interpretor.cxx", change prototype of the CommandCmd() method, line 60, to expect "const char* argv[]". Subsequently, "argv" was casted to "(char** const&)" on line 67. Similarly, for Tcl_CreateCommand() call on line 179, method "WOKCommand()" must be modified on line 80, 97, and 113 with the latter casting to "(char*)". Cast the "argv" pointer arg to Tcl_SplitList() to a "(const char***)" on line 443. Cast the "argv" arg to Tcl_CmdInfo proc() to a "(const char**)" on lines 688, 709, and 727.

A patch file would be nice I can post one if there is interest.