构建tk8.4.19-src时出错

时间:2013-09-02 11:06:15

标签: tcl tk

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

rules.vc(449) : fatal error U1023: syntax error in expression
Stop.

我不知道解决方案。请帮忙。


编辑:调用nmake

的buildall.vc文件
@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 15.0.30729.1

C ++编译器使用:Visual Studio 9 2008 Win32

3 个答案:

答案 0 :(得分:1)

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

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

这是

!if exist("$(_TCLDIR)\include\tcl.h")

我在路径周围使用引号设置了TCLDIR宏。 删除引号使我的问题消失了。

答案 1 :(得分:0)

如果我们看一下line 449 of rules.vc in the Tcl 8.4.19 distribution,它看起来并不起眼;在它之前还有许多其他的行在我看来在语法上是相似的。

如果我们查看line 449 of rules.vc in the Tk 8.4.19 distribution,那么 对我来说也不起眼;没有任何东西可以用其他前几行也不会发出的方式尖叫出“我错了”。

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

简而言之,我无法弄清楚为什么它可能会抱怨该行

最重要的是,你是唯一一个似乎有这个问题的人。还有其他人在Windows上使用这些文件构建(当我们在其中犯了一个真正的错误时,他们很快就会抱怨)所以我们对它有相当高的信心#&# 39;在您似乎有报告的任何rules.vc版本中都不是问题。这意味着无论出现什么问题,它都很可能成为你做一些奇怪的事情所导致的问题。唉,这个世界上有太多奇怪的东西,而这个特殊的东西对我来说并不熟悉。

答案 2 :(得分:0)

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

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

)。现在正在编译作品。

相关问题