diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2023-12-20 11:06:10 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2023-12-20 11:06:10 (GMT) |
commit | e1d9effa09ef0e191dc1c74e423293d182663064 (patch) | |
tree | 43191efb4cc383d2d27e6d4b3e1a16bc1615fb47 | |
parent | 6619a77555397c5e510f3ff908dd0679aae47fa7 (diff) | |
download | tk-e1d9effa09ef0e191dc1c74e423293d182663064.zip tk-e1d9effa09ef0e191dc1c74e423293d182663064.tar.gz tk-e1d9effa09ef0e191dc1c74e423293d182663064.tar.bz2 |
Ticket [0de707ab06]: Add explanation of the solution provided on the core list by Jan
-rw-r--r-- | unix/tkAppInit.c | 18 | ||||
-rw-r--r-- | win/winMain.c | 18 |
2 files changed, 36 insertions, 0 deletions
diff --git a/unix/tkAppInit.c b/unix/tkAppInit.c index 5252972..5b6e14e 100644 --- a/unix/tkAppInit.c +++ b/unix/tkAppInit.c @@ -12,6 +12,24 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ +/* + * Explanation on following undef USE_TCL_STUBS by JN 2023-12-19 on the core list: + * What's going on is related to TIP #596: + * Stubs support for Embedding Tcl in other applications + * + * If an application using Tcl_Main() is compiled with USE_TCL_STUBS, + * Tcl_Main() will be replaced by a stub function, which loads + * libtcl9.0.so/tcl90.dll and then calls its Tcl_MainEx(). If + * libtcl9.0.so/tcl90.dll is not present (at runtime), a crash is what happens. + * + * So ... tkAppInit.c should not be compiled with USE_TCL_STUBS + * (unless you want to use the TIP #596 functionality) + * + * The proper solution is to make sure that Makefile.in doesn't use + * TCL_USE_STUBS when compiling tkAppInit.c. But that's a + * quite big re-organization just before a b1 release. Simpler + * is just to #undef'ine USE_TCL_STUBS, it has the same effect. + */ #undef USE_TCL_STUBS #undef BUILD_tk #undef STATIC_BUILD diff --git a/win/winMain.c b/win/winMain.c index b93e11e..7f4ab28 100644 --- a/win/winMain.c +++ b/win/winMain.c @@ -12,6 +12,24 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ +/* + * Explanation on following undef USE_TCL_STUBS by JN 2023-12-19 on the core list: + * What's going on is related to TIP #596: + * Stubs support for Embedding Tcl in other applications + * + * If an application using Tcl_Main() is compiled with USE_TCL_STUBS, + * Tcl_Main() will be replaced by a stub function, which loads + * libtcl9.0.so/tcl90.dll and then calls its Tcl_MainEx(). If + * libtcl9.0.so/tcl90.dll is not present (at runtime), a crash is what happens. + * + * So ... tkAppInit.c should not be compiled with USE_TCL_STUBS + * (unless you want to use the TIP #596 functionality) + * + * The proper solution is to make sure that Makefile.in doesn't use + * TCL_USE_STUBS when compiling tkAppInit.c. But that's a + * quite big re-organization just before a b1 release. Simpler + * is just to #undef'ine USE_TCL_STUBS, it has the same effect. + */ #undef USE_TCL_STUBS #include "tk.h" #define WIN32_LEAN_AND_MEAN |