Re: Tcl/Tk 8.6b2 Release Candidates

Don Porter wrote:

Paweł wrote:
and on native win32 msvc-2005-express build fails with:

D:\buildenv\windows\VC8.0\tcl8.6b2\win>nmake -f release

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.

vercl.i(18) : fatal error U1034: syntax error : separator missing
Error during compilation of Tcl

Forgive me if I'm missing something obvious; Windows is not my
development home. Is there some theory why Tcl is to blame for
a failure of your compiler to build a source file from a third
party that you've added to the picture?

in the classic way, the makefile for msvc generates a win/vercl.x:

#if defined(_M_IX86)
#elif defined(_M_AMD64)

next it spawns a msvc compiler to preprocess vercl.x into a vercl.i

#line 1 "vercl.x"
#line 7 "vercl.x"

and finally it *includes* vercl.i into msvc makefile to get
a compiler version and architecture for further actions.

if a user setup a global force include by setting env. variable
with flags for compiler (@set CL="/FI....path_to_header...")
then this preprocessed user header explodes as syntax error in makefile:

#line 1 "vercl.x"
#line 1 "d:\\buildenv\\windows\\VC8.0\\..\\..\\sources\\targetsxs.h"

__declspec(selectany) int _forceCRTManifest;
__declspec(selectany) int _forceMFCManifest;
__declspec(selectany) int _forceAtlDllManifest;
__declspec(selectany) int _forceCRTManifestRTM;
__declspec(selectany) int _forceMFCManifestRTM;
__declspec(selectany) int _forceAtlDllManifestRTM;

#line 28 "d:\\buildenv\\windows\\VC8.0\\..\\..\\sources\\targetsxs.h"
#line 1 "vercl.x"
#line 7 "vercl.x"

If there's a proposed fix for this that involves a patch to Tcl,
I'll look it over, but just this report of the issue doesn't give
me any sense of what needs to be done to what to make things better.

for quick testing i've replaced a part of with:

!if ![echo $(_HASH)include <stdio.h> > vercl.c] \
&& ![echo int main() { >> vercl.c] \
&& ![echo printf( "VCVERSION=%d\n", _MSC_VER ); >> vercl.c] \
&& ![echo $(_HASH)if defined(_M_IX86) >> vercl.c] \
&& ![echo puts( "ARCH=IX86" ); >> vercl.c] \
&& ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.c] \
&& ![echo puts( "ARCH=AMD64" ); >> vercl.c] \
&& ![echo $(_HASH)endif >> vercl.c] \
&& ![echo } >> vercl.c] \
&& ![cl -nologo -TC vercl.c $(ERRNULL)] \
&& ![vercl.exe >vercl.i]
!include vercl.i

this trick gives me a compiled vercl.exe which outputs:


this output could be logged to vercl.i and included back to makefile
but the '&& ![vercl.exe >vercl.i]' line doesn't work for me.

was unexpected at this time.
vercl.c : fatal error U1023: syntax error in expression
Error during compilation of Tcl

it's probably a trivial nmake syntax error but i don't know
this tool very well...