How can I detemin if my extension DLL is STUBS ENABLED? - TCL

This is a discussion on How can I detemin if my extension DLL is STUBS ENABLED? - TCL ; I have built a simple extension using SWIG. I have defined the macro USE_TCL_STUBS. Managed to get the code to link to produce tclSCSI.dll. It would seem that the tclSCSI.dll has an explicit dependancy on tcl84.dll. Does this mean my ...

+ Reply to Thread
Results 1 to 3 of 3

How can I detemin if my extension DLL is STUBS ENABLED?

  1. Default How can I detemin if my extension DLL is STUBS ENABLED?

    I have built a simple extension using SWIG. I have defined the macro
    USE_TCL_STUBS. Managed to get the code to link to produce tclSCSI.dll.

    It would seem that the tclSCSI.dll has an explicit dependancy on
    tcl84.dll. Does this mean my extension is NOT stubs-enabled. Will a
    STUBS ENABLE dll remove this dependancy?

    tony

  2. Default Re: How can I detemin if my extension DLL is STUBS ENABLED?

    mets wrote:
    > I have built a simple extension using SWIG. I have defined the macro
    > USE_TCL_STUBS. Managed to get the code to link to produce tclSCSI.dll.
    >
    > It would seem that the tclSCSI.dll has an explicit dependancy on
    > tcl84.dll. Does this mean my extension is NOT stubs-enabled. Will a
    > STUBS ENABLE dll remove this dependancy?


    Yes. If it was properly linked against stubs you should only have a
    dependency on tclstub84.lib (dll? I can't remember now). To build
    against Tcl's stubs interface you need to do the following:

    1) Define USE_TCL_STUBS while compiling
    2) In your Foo_Init you need to call Tcl_InitStubs
    3) Link against -ltclstub84 rather than -ltcl84

    -- Neil

  3. Default Re: How can I detemin if my extension DLL is STUBS ENABLED?

    On Apr 11, 3:11 am, Neil Madden <n...@cs.nott.ac.uk> wrote:
    > mets wrote:
    > > I have built a simple extension using SWIG. I have defined the macro
    > > USE_TCL_STUBS. Managed to get the code to link to produce tclSCSI.dll.

    >
    > > It would seem that the tclSCSI.dll has an explicit dependancy on
    > > tcl84.dll. Does this mean my extension is NOT stubs-enabled. Will a
    > > STUBS ENABLE dll remove this dependancy?

    >
    > Yes. If it was properly linked against stubs you should only have a
    > dependency on tclstub84.lib (dll? I can't remember now). To build
    > against Tcl's stubs interface you need to do the following:
    >
    > 1) Define USE_TCL_STUBS while compiling
    > 2) In your Foo_Init you need to call Tcl_InitStubs
    > 3) Link against -ltclstub84 rather than -ltcl84


    The latter may be your only problem. You can use stubs and still link
    against the regular Tcl lib (at least with the current sources, this
    may change). Why you would do that? Dunno, which is why it may
    change for 8.6.

    Jeff

+ Reply to Thread