#624 Missing objectfiles in static lib

pending-fixed
Jan Nijtmans
5
2012-07-31
2012-07-17
Decoster Jos
No

When building a static tclsh and .lib using makefile.vc, the dde and registry code is not added to the .lib. The attached patch adds those object files to the static .lib.

Aa a side question: what should be done with tclOOStubLib.obj, tclStubLib.obj and tclTomMathStubLib.obj when building a static .lib with makefile.vc? Should they be added to the .lib too?

Discussion

1 2 3 > >> (Page 1 of 3)
  • Decoster Jos
    Decoster Jos
    2012-07-17

    Add dde an registry object files to static lib

     
  • Don Porter
    Don Porter
    2012-07-17

    dde and registry are [load]able packages. Not clear to
    me why their code ought to be in a static Tcl library.

    The other things you mention have dev history as packages,
    but they are now simply part of Tcl. Need to be in the Tcl library.

     
  • Decoster Jos
    Decoster Jos
    2012-07-17

    When building with OPTS=staticpkg dde and registry are linked into the tclsh, but should also be in the tcl86.lib to make it possible to embed Tcl into an app with Tcl statically linked, including dde and registry.

     
  • Jan Nijtmans
    Jan Nijtmans
    2012-07-17

    tclOOStubLib.obj, tclStubLib.obj and tclTomMathStubLib.obj
    are in the stub library tcl86stub.lib. Previously they were in
    the static library as well, but not any more since 8.6. That's
    on purpose!

    Applications linking with OPTS=staticpkg
    still can load dde/registry dynamically, or include it in the
    build. If you want the latter, you can just add tclWinDde.o,
    tclWinReg.o and tclstub86.lib to the link line, then you
    have everything.

    Would that work for you?

     
  • Jan Nijtmans
    Jan Nijtmans
    2012-07-17

    • status: open --> open-works-for-me
     
  • Decoster Jos
    Decoster Jos
    2012-07-17

    I ship tcl86.lib to customers, having everything in one lib is far easier. Why add it to tclsh and not to the lib? For me OPTS=staticpkgs hints at non-loadable packages present in the lib, not just the tclsh.

     
  • Jan Nijtmans
    Jan Nijtmans
    2012-07-17

    In Tcl 8.5's makefile.vc I see:

    TCLSHOBJS = \ $(TMP_DIR)\tclAppInit.obj \ !if $(TCL_USE_STATIC_PACKAGES)
    $(TMP_DIR)\tclWinReg.obj \ $(TMP_DIR)\tclWinDde.obj \ !endif
    $(TMP_DIR)\tclsh.res

    To me that means that OPTS=staticpkgs means
    that the registry and dde packages should be
    added to tclsh.exe, not to tclsh85.lib. Changing
    that would be a feature request, not a bug.

     
  • Don Porter
    Don Porter
    2012-07-17

    Apologies. I overlooked the "StubLib" part of those
    filenames.

     
    • status: open-works-for-me --> pending-works-for-me
     
  • The *only* purpose of the *StubLib files is to allow an external piece of code to connect to Tcl's API (or the API one of the built-in extensions). Code that's "inside" Tcl (in the same executable) doesn't need stubs; it should be directly bound. There's no point at all in building the *StubLib objects into a Tcl executable; they're just for extension DLLs.

     
1 2 3 > >> (Page 1 of 3)