Tcl 构建tk8.4.19-src时出错

Tcl 构建tk8.4.19-src时出错,tcl,tk,Tcl,Tk,通过buildall.vc批处理文件为windows构建tk8.4.19-src时。它显示以下错误: rules.vc(449) : fatal error U1023: syntax error in expression Stop. 我不知道解决办法。请帮忙 编辑:buildall.vc文件,该文件正在调用nmake @echo off :: This is an example batchfile for building everything. Please :: edit t

通过buildall.vc批处理文件为windows构建tk8.4.19-src时。它显示以下错误:

rules.vc(449) : fatal error U1023: syntax error in expression
Stop.
我不知道解决办法。请帮忙


编辑:buildall.vc文件,该文件正在调用nmake

@echo off

::  This is an example batchfile for building everything. Please ::  edit this (or make your own) for your needs and wants using ::  the instructions for calling makefile.vc found in makefile.vc :: ::  RCS: @(#) $Id: buildall.vc.bat,v 1.4 2002/11/04 07:49:43 davygrvy Exp $

echo Sit back and have a cup of coffee while this grinds through ;) echo You asked for *everything*, remember? echo.

title Building Tk, please wait...

if "%MSVCDir%" == "" call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"  ::if "%MSVCDir%" == "" call "C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\bin\vcvars32.bat"



set INSTALLDIR =C:\Program Files\Tcl

:: Where is the Tcl source directory? set TCLDIR= "C:\Tcl\include\tcl8.5" ::set TCLDIR=..\..\tcl8.4 pause :: Build the normal stuff along with the help file. :: nmake -nologo -f makefile.vc release winhelp OPTS=none if errorlevel 1 goto error

:: Build the static core, dlls and shell. :: nmake -nologo -f makefile.vc release OPTS=static if errorlevel 1 goto error pause :: Build the special static libraries that use the dynamic runtime. :: nmake -nologo -f makefile.vc core OPTS=static,msvcrt if errorlevel 1 goto error

:: Build the core and shell for thread support. :: nmake -nologo -f makefile.vc release OPTS=threads if errorlevel 1 goto error

:: Build a static, thread support core library (no shell). :: nmake
-nologo -f makefile.vc core OPTS=static,threads if errorlevel 1 goto error

:: Build the special static libraries the use the dynamic runtime, :: but now with thread support. :: nmake -nologo -f makefile.vc core OPTS=static,msvcrt,threads if errorlevel 1 goto error

goto end

:error echo *** BOOM! ***

:end title Building Tk, please wait...DONE! echo DONE! pause

我使用的C++编译器标识是MSVC 150.307291

C++编译器使用:Visual Studio 9 2008 Win32;在我看来,前面还有许多行在语法上相似

如果我们看,它对我来说也不起眼;没有任何东西能像前面的其他台词那样大声喊出“我错了”

如果我们看一下您添加的(损坏的)代码,它似乎是指Tcl 8.5,或者可能是Tk 8.5。和的等效线也不显著。(选择这些版本是因为它们是您提出问题时的当前版本。)强烈建议您在构建Tk时不要混合使用不同版本的Tcl和Tk(但是Tk可能会在构建之后加载到更高版本的Tcl中;Tk 8.5和Tcl 8.6更可能是这样,在Tk 8.5和Tcl 8.6中,至少需要一些努力来检查它是否偶尔工作)

简而言之,我不明白为什么它会特别抱怨这句话


最重要的是,你是唯一一个出现这个问题的人。还有其他人在Windows上使用这些文件进行构建(当我们在这些文件中犯了真正的错误时,他们会很快抱怨)因此,我们有相当高的信心,在任何版本的
规则.vc
中,您似乎都有报告。这意味着无论出现什么问题,都很可能是您做了一些奇怪的事情导致的问题。唉,这个世界上有太多奇怪的事情,尤其是这个问题对我来说是不熟悉的。

我在编译tk 8.6.3时遇到了同样的问题

rules.vc(514) : fatal error U1023: syntax error in expression
哪条线

!if exist("$(_TCLDIR)\include\tcl.h")
我已经使用路径周围的引号设置了TCLDIR宏。 删除引号使问题消失了。

也有同样的问题。 当我确保目录tcl8.6.9和tk8.6.9位于路径中没有空格的位置(不在C:\Program Files…)时,以及在设置环境变量TCLDIR、TCL_LIBRARY和TK_LIBRARY时,也没有空格,路径周围也没有“空格”时,就消失了(


)。现在可以编译了。

至少提供您使用的编译器/版本以及如何调用NMakefile。此外,请尝试8.4.20版(或者更好的版本是8.5/8.6版,它不像8.4版那样已经过时。)并报告您尝试进行生成的目录的名称。请再次查看问题我已经编辑了它。
set TCLDIR=C:\tcl8.6.9
REM Not!!! :  set TCLDIR="C:\tcl8.6.9"
set TCL_LIBRARY=C:\tcl8.6.9\library
set TK_LIBRARY=C:\tk8.6.9\library