TDBC

Ticket Change Details
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Overview

Artifact ID: 7986673ab0c12a4a91f7cc1c8a4faf7a322a2860d3310d413b729519ec30b4e8
Ticket: d6c4db25560b1a8c3a26f9369e57cf00327cb9b4
makefile.vc: compile tdbcStubLib.c with -DTCL_USE_STUBS to not make tdbcodbc.dll dependent on tcl86t.dll
User & Date: oehhar 2019-08-28 20:21:17
Changes

  1. Change foundin to "1.1.0"
  2. Change icomment to:

    Issue

    "tdbcodbc1.1.0.dll" will refuse to load with an error "a depend library may not be found" under the following conditions:

    • makefile.vc build method
    • the only visible tcl is included in a starkit (no tcl86t.dll available as single file)

    Problem reason

    "tdbcstublib.c" is compiled without "-DUSE_TCL_STUBS" and build into the library "tdbcstub110.lib". This library has a dependency to tcl86t.dll.

    This library is then linked into tdbcodbc.1.1.0.dll with the source file "tcl86t.lib".

    This results in a dependency on tcl86t.dll. This is not a problem when there is a tcl86t.dll available (no starkit).

    The dependency may be verified using the tool Dependency Walker. Just drop the dll into the window and look to the middle pane. It lists "tcl86t.dll".

    As a side note, supplying beside the starkit a "tcl86t.dll" stopped my application without any notice when tdbcodbc1.1.0.dll is loaded.

    Manual solution

    Here is my modified build line broken into multiple lines for readability:

    cl -nologo -c /D_ATL_XP_TARGETING  -W3
      -FpC:\test\tcl8.6.9_tdbcodbc\pkgs\tdbc1.1.0\win\Release\tdbc_ThreadedDynamic\ -Op -QI0f -O2 -YX
      -DPACKAGE_NAME="\"tdbc\""  -DPACKAGE_TCLNAME="\"tdbc\""  -DPACKAGE_VERSION="\"1.1.0\""
      -DMODULE_SCOPE=extern  -DTCL_CFGVAL_ENCODING=\"cp1252\" -DSTDC_HEADERS -DTCL_THREADS=1
      -DUSE_THREAD_ALLOC=1 -DNDEBUG -DTCL_CFG_OPTIMIZED -DNO_STRTOI64 -DUSE_TCL_STUBS -Zl
      -DSTATIC_BUILD -I"C:\test\tcl8.6.9_tdbcodbc\win\..\generic"
      -I"C:\test\tcl8.6.9_tdbcodbc\win\..\win"
      -I"C:\test\tcl8.6.9_tdbcodbc\pkgs\tdbc1.1.0\win\..\generic"
      -I"C:\test\tcl8.6.9_tdbcodbc\pkgs\tdbc1.1.0\win\..\win"
      -I"C:\test\tcl8.6.9_tdbcodbc\pkgs\tdbc1.1.0\win\..\compat"
      -FoC:\test\tcl8.6.9_tdbcodbc\pkgs\tdbc1.1.0\win\Release\tdbc_ThreadedDynamic\
      C:\test\tcl8.6.9_tdbcodbc\pkgs\tdbc1.1.0\win\..\generic\tdbcStubLib.c
    

    (this is ms-vc6 PSDK 2003SP1 32 bit build on a 64 bit windows 10).

  3. Change login to "oehhar"
  4. Change mimetype to "text/x-fossil-wiki"
  5. Change private_contact to "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
  6. Change severity to "Critical"
  7. Change status to "Open"
  8. Change title to:

    makefile.vc: compile tdbcStubLib.c with -DTCL_USE_STUBS to not make tdbcodbc.dll dependent on tcl86t.dll

  9. Change type to "Build_Problem"