|
From: David G. <dav...@po...> - 2004-02-04 19:32:00
|
ke...@cr... (Kevin Kenny) wrote:
>This linkage is INDEPENDENT of whether the compiler places symbols
>in the executable. It is possible to have a configuration where there
>are debugging symbols but link with the "release" version of the
>library, and conversely, a version without symbols but nonetheless
>linked with the "debug" version. It's a trifle more complicated, though,
>because VC++ provides packaged option sets for standard "debug" and
>"release" builds that combine common options.
>
>The incompatibility between checked and unchecked runtime libraries is
>what drives the inclusion of a 'd' or 'g' suffix on the names of the DLLs
>on Windows when --enable-symbols is used. The checked/unchecked state
>of all DLLs have to match - and hence, tk85g.dll refers to tcl85g.dll,
>and both refer to msvcrtd.dll.
There's also the issue of TCL_MEM_DEBUG with the naming as well. If you
didn't build for symbols, but wanted TCL_MEM_DEBUG, ./configure with still
suffix with 'g'. So later when you load the extension and happen to have
this ditty in the associated pkgIndex.tcl:
if {[info exists ::tcl_platform(debug)]} {
package ifneeded dde 1.3 [list load [file join $dir tcldde13g.dll] dde]
} else {
package ifneeded dde 1.3 [list load [file join $dir tcldde13.dll] dde]
}
You'll get the wrong action because ::tcl_platform(debug) is only set when
the symbols option is used.
This is different in makefile.vc as it doesn't suffix for a TCL_MEM_DEBUG
build.
>This option has *got* to be separated out - if only by decreeing that
>TEA-compliant extensions will build with the unchecked library always.
>Right now, the whole mess is simply a nightmare on Windows.
-MD (unchecked c-runtime)
-MDd (checked c-runtime)
-Z7 (build with symbols)
I've never tried -MD with -Z7, in place of -MDd -Z7. It probably works.
TCL_MEM_DEBUG with -MD I know works. I could add an option to makefile.vc
called 'unchecked' to make sure msvcrt.dll is only used.
--
David Gravereaux <dav...@po...>
[species: human; planet: earth,milkyway(western spiral arm),alpha sector]
|