Hello everybody.
To recapitulate: During my quest to upgrade Perl/Tk on VMS to run on the newest (er,
next-newest since
800.019 came out) version of
Perl/Tk, one of my problems was 119 undefined's reported during linking of
[.EVENT]EVENT.EXE.
I have now figured out where the 119 undefined's came from, and - it was my own fault
all along.
Here's the story:
In the Tk800.012-based version of Perl/Tk on VMS, I implemented the function
Tcl_VMSWaitForEvent,
which does whatever is required in order to wait for X events and Tk timer events
simultaneously
under VMS. It is declared in TCLUNIXNOTFY.C, it is called from
TCLUNIXNOTFY.Tcl_WaitForEvent
and from TKUNIXEVENT.TkUnixDoOneXEvent, in both cases as the VMS-specific replacement
of
UNIX 'select'.
Under Tk800.018, I implemented similar changes: Declared Tcl_VMSWaitForEvent in
TCLUNIXNOTFY.C,
called it from TCLUNIXNOTFY.Tcl_WaitForEvent and from TKUNIXEVENT.TkUnixDoOneXEvent.
However, during build, I had Tcl_VMSWaitForEvent undefined during link of TK.EXE, plus
'many' undefineds during link of
EVENT.EXE (most of them were XLib names). I now noticed, that the entire contents of
TCLUNIXNOTFY.C
had become conditioned on #ifdef TCL_EVENT_IMPLEMENT. I thought, that maybe I needed
to move the declaration of Tcl_VMSWaitForEvent over to TKUNIXEVENT.C, to get it
declared. Having done that, TK.EXE
linked without undefineds, EVENT.EXE now linked still with 'many' undefineds. I got
rid of the XLib
undefineds (using LIBS in MAKEFILE.PL), but the now-famous 119 non-XLib names remained.
Nick's latest reply
[snip]
>Tk::Event is supposed to be a completely stand-alone module.
>It is a place holder for Joshua's Event module.
>Thus the core event loop bits of Ptk are supposed to be pulled out
>of pTk/libpTk.a or #include'd into .c files in Event and compiled there.
>Those routines should _only_ be in Event and not in Tk itself. Likewise
>all the GUI stuff should be in Tk and not in Event.
[snip]
prompted me to study things again, and the result is: Having moved Tcl_VMSWaitForEvent
into
TKUNIXEVENT.C forces EVENT.EXE to include TKUNIXEVENT, which then tries to pull in
everything
else, with the 119 undefineds as a result!
I moved Tcl_VMSWaitForEvent back to TCLUNIXNOTFY.C, but this time conditioned on
#if !defined(TCL_EVENT_IMPLEMENT)
and this did the trick, no more undefineds.
Two remaining issues:
1) It appears slightly clumsy to have Tcl_VMSWaitForEvent declared on the above
mentioned
condition (this is what I have right now) - as it is, it is called from both TK.EXE
and EVENT.EXE, and should perhaps be declared in a separate module of its own - or
maybe it would do to put it into TKGLUE??
(VMS-specific obviously).
2) Nick indicates, that everything to do with events should be in EVENT.EXE - however,
TKUNIXEVENT.TkUnixDoOneXEvent also in principle has to do with events, but today
remains in TK.EXE - maybe a comment is in order.
Best regards
Jesper Naur