Skip to content
Tcl Source Code History Of Ticket a55872c242
Login

History Of Ticket a55872c242

Artifacts Associated With Ticket a55872c242

  1. Ticket change [6999bb2960] (rid 201991) by ralfixx on 2022-06-20 10:37:19:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      Taking the minimal tclsh example from
          https://wiki.tcl-lang.org/page/Building+a+custom+tclsh
          /* t.c */
          #include <tcl.h>
          int AppInit(Tcl_Interp *interp) {
            if(Tcl_Init(interp) == TCL_ERROR) return TCL_ERROR; 
            Tcl_SetVar(interp,"tcl_rcFileName","~/.wishrc",TCL_GLOBAL_ONLY);
            return TCL_OK;
          }
          int main(int argc, char *argv[]) {
            Tcl_Main(argc, argv, AppInit);
            return 0; 
          }
          /* End of file */
      
      Linking on windows now requires linking against the TCL stubs library in
      8.7, where this was not required in 8.6.
      
      This is due to a change in the Tcl_Main macro on windows, which now
      includes a call to Tcl_SetPanicProc(Tcl_ConsolePanic) in tcl.h:
      
         #define Tcl_Main(argc, argv, proc) Tcl_MainEx(argc, argv, proc, \
      	    ((Tcl_SetPanicProc(Tcl_ConsolePanic), Tcl_CreateInterp)()))
      
      where 'Tcl_ConsolePanic' is #defined NULL on Linux, but a real function
      on Windows, which is only available in the stubs library.
      
        Linking against 8.7:
          $ cl /nologo /Fet.exe t.c -Itcltk87/include tcltk87/lib/tcl87.lib
          t.c
          t.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "Tcl_ConsolePanic" in Funktion "main".
          t.exe : fatal error LNK1120: 1 nicht aufgelöste Externe
      
          adding tcltk87/lib/tclstub87.lib to the link line => success.
          $ cl /nologo /Fet.exe t.c -Itcltk87/include tcltk87/lib/tcl87.lib tcltk87/lib/tclstub87.lib
          t.c
          => success
      
        Linking against 8.6:
          $ cl /nologo /Fet.exe t.c -Itcltk86/include tcltk86/lib/tcl86.lib
          t.c
          => success
      
      Not sure if this was intentional, but it probably should be documented
      in the Tcl_Main manpage, which already reads
      
          Programs that call Tcl_Main must be linked
          against the standard Tcl library.
      
    5. foundin initialized to: "8.7"
    6. is_private initialized to: "0"
    7. login: "ralfixx"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "1d3c95db24e116878d6afed7cf890a89a0effe62"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "ralfixx"
    14. subsystem initialized to: "69. Other"
    15. title initialized to:
      tcl8.7 on windows: linking against stubs library is now required in 8.7
      
    16. type initialized to: "Bug"
  2. Ticket change [939cf3e827] (rid 201992) by oehhar on 2022-06-20 10:45:25:

    1. icomment:
      Thank you, Ralf,
      
      IMHO, this is a bug. IMHO, it should work by one of:
      
         *   static build
         *   link to tcl lib
         *   link to tcl stubs lib
      
      As you report, the tcl lib is not sufficient. The stubs lib is required.
      
      Thank you,
      Harald
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  3. Ticket change [bb3744b19b] (rid 201993) by jan.nijtmans on 2022-06-20 11:29:14:

    1. assignee changed to: "jan.nijtmans"
    2. icomment:
      This change is due to [https://core.tcl-lang.org/tips/doc/trunk/tip/425.md|TIP #425]. Tcl_ConsolePanic() needs to be static, because the panicproc could - theoretically - be called even after bringing down tcl.dll. The only way I see to fulfill this requirement is putting Tcl_ConsolePanic() in the stub library, then we are sure it is linked statically in the executable so it will always be available.
      
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"
  4. Ticket change [efd0e3ab13] (rid 202000) by jan.nijtmans on 2022-06-20 11:58:19:

    1. icomment:
      If the Tcl library is static, the stub library should not be necessary. That's fixed [a55872c242|here]. If the Tcl library is a dll, I don't see a solution without the stub library. So, documented that now.
      
      Ralf, can you live with that ;-)
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Fixed"
    5. status changed to: "Pending"
  5. Ticket change [229d1b36af] (rid 202001) by jan.nijtmans on 2022-06-20 11:59:43:

    1. icomment:
      Fix is really [3483c7eafdebabe8|here]  (previous link just links back to this ticket....)
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  6. Ticket change [cff325ddad] (rid 202002) by ralfixx on 2022-06-20 14:15:28:

    1. icomment: "Yes, of course I can live with that ;-)"
    2. login: "ralfixx"
    3. mimetype: "text/plain"
  7. Ticket change [e6c0d7fce9] (rid 202013) by jan.nijtmans on 2022-06-20 15:21:30:

    1. closedate changed to: "2459751.13993464"
    2. closer changed to: "jan.nijtmans"
    3. icomment: "Changes committed now. Thanks!"
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"
    6. status changed to: "Closed"