Menu

#3209 build broken, VC++ with msvcrt,static,symbols

obsolete: 8.5a4
closed-fixed
5
2005-10-14
2005-08-11
No

On Windows, with VC++, latest sdk, I get this:

E:\Programming\Tcl-source\cvs-tcl\win>nmake -f
makefile.vc OPTS=symbols,static,m
svcrt release

Microsoft (R) Program Maintenance Utility Version
6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights
reserved.

===============================================================================
*** Compiler has 'Optimizations'
*** Compiler has 'Pentium 0x0f fix'
*** Linker has 'Win98 alignment problem'
*** Doing static
*** Doing msvcrt
*** Doing symbols
*** Intermediate directory will be '.\Debug\tcl_StaticX'
*** Output directory will be '.\Debug'
*** Suffix for binaries will be 'sgx'
*** Optional defines are
'-DTCL_CFGVAL_ENCODING=\"cp1252\" -DSTATIC_BUILD -DTCL_
CFG_DEBUG'
*** Dependency rules are not being used.

cl -nologo -c -YX -Fp.\Debug\tcl_StaticX\ -W3
-QI0f -Z7 -WX -Od -GZ -MDd
-I"..\win" -I"..\generic" -I"..\libtommath"
-DTCL_PIPE_DLL=\"tclpip85sgx.dll\"
-DTCL_TOMMATH -DTCL_CFGVAL_ENCODING=\"cp1252\"
-DSTATIC_BUILD -DTCL_CFG_DEBUG -
DBUILD_tcl -Fo.\Debug\tcl_StaticX\
@C:\DOCUME~1\VinceD\LOCALS~1\Temp\nma00196.
tclMain.c
..\generic\tclMain.c(33) : error C2220: warning treated
as error - no object fil
e generated
..\generic\tclMain.c(33) : warning C4273: 'isatty' :
inconsistent dll linkage.
dllexport assumed.
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

(The same problem also occurs with Tk).

Note: the above build style is needed to build a debug
version of tclkit.exe

Discussion

  • Jeffrey Hobbs

    Jeffrey Hobbs - 2005-10-05
    • assigned_to: mdejong --> davygrvy
     
  • Pat Thoyts

    Pat Thoyts - 2005-10-11

    Logged In: YES
    user_id=202636

    static,msvcrt wants __declspec(import)
    static doesnt. As far as I can tell there is no way to know
    that we have a MSVCRT build without adding a macro for this.
    We could just disable the warning - the build terminates
    because we pass -WX which causes the build to treat warnings
    as errors.
    The warning can be disabled by adding the following to the
    tclMain.c file:

    #ifdef _MSC_VER
    #pragma warning(disable:4273)
    #endif

     
  • David Gravereaux

    • assigned_to: davygrvy --> patthoyts
     
  • David Gravereaux

    Logged In: YES
    user_id=7549

    I'm without any software tools at this time, so I can't help
    today.

    Seems to me like the macro expansion of -MDd by the compiler
    to the runtime header files is not doing what it is supposed
    to. I'd suggest looking at where isatty() is declared to
    see why it isn't being decorated correctly.

    Off hand, I think -MDd expands to _DEBUG, _DLL and one other.

     
  • Pat Thoyts

    Pat Thoyts - 2005-10-14

    Logged In: YES
    user_id=202636

    _DLL is defined by the compiler with -MD/-MDd so we can use
    that to arrange for correct function decoration.
    Tested this using the NMAKE build system and also the
    configure+msys build system with MSVC and gcc.

     
  • Pat Thoyts

    Pat Thoyts - 2005-10-14
    • status: open --> closed-fixed
     
MongoDB Logo MongoDB