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
- foundin changed to: "1.1.0"
- icomment:
<H1>Issue</H1> "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) <H1>Problem reason</H1> "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. <H1>Manual solution</H1> Here is my modified build line broken into multiple lines for readability: <verbatim> 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 </verbatim> (this is ms-vc6 PSDK 2003SP1 32 bit build on a 64 bit windows 10).
- login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
- severity changed to: "Critical"
- status changed to: "Open"
- title changed to:
makefile.vc: compile tdbcStubLib.c with -DTCL_USE_STUBS to not make tdbcodbc.dll dependent on tcl86t.dll
- type changed to: "Build_Problem"