读书人

Logiscope TestChecker有关问题~

发布时间: 2012-02-07 17:45:37 作者: rapoo

Logiscope TestChecker问题~~
用Logiscope的TestChecker,每次做到Build那里就进行不下去了,具体信息如下:

Building TestChecker C Project three2.ttp...
Analyzing: C:/try2/try2.c...
log_cc : using default options file : C:\Program Files\Telelogic\Logiscope\bin\..\util\MSC60.def

Analyzing: C:/try2/try2.inst.c...
log_cc : using default options file : C:\Program Files\Telelogic\Logiscope\bin\..\util\MSC60.def
C:/try2/try2.inst.c(3): warning: `#pragma once' is obsolete


C:\try2>CALL "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\BIN\VCVARS32.BAT"
Setting environment for using Microsoft Visual C++ tools.

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

TRY2.MAK(1) : fatal error U1023: syntax error in expression
Stop.
Build aborted.

MakeLog.bat文件内容如下:
CALL "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\BIN\VCVARS32.BAT"
NMAKE /A /F TRY2.MAK CFG="TRY2 - WIN32 LOGISCOPE"

为什么不通过啊。。。急求解答。。谢谢

[解决办法]
首先请看这句:

TRY2.MAK(1) : fatal error U1023: syntax error in expression
Stop.
Build aborted.

这是Makefile的错误信息,打开TRY2.MAK,部分代码如下:
# Microsoft Developer Studio Generated NMAKE File, Based on try2.dsp
!IF $(CFG)" == "
CFG=try2 - Win32 Logiscope
!MESSAGE No configuration specified. Defaulting to try2 - Win32 Logiscope.
!ENDIF

!IF "$(CFG)" != "try2 - Win32 Release" && "$(CFG)" != "try2 - Win32 Debug" && "$(CFG)" != "try2 - Win32 Logiscope"
!MESSAGE 指定的配置 "$(CFG)" 无效.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "try2.mak" CFG="try2 - Win32 Logiscope"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "try2 - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "try2 - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "try2 - Win32 Logiscope" (based on "Win32 (x86) Console Application")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF

!IF $(OS)" == "Windows_NT

注释不算,显然第一行的引号是用来引$(CFG)的,和第二行应该是同一句;后面23行相似的错误改正后,再用nmake命令发现还有错误。再看19行,发现有个ERROR命令,显然没有这样的命令,原意应该是指ELSE吧,更改所有代码后如下。

# Microsoft Developer Studio Generated NMAKE File, Based on try2.dsp
!IF "$(CFG)" == "CFG=try2 - Win32 Logiscope"
!MESSAGE No configuration specified. Defaulting to try2 - Win32 Logiscope.
!ENDIF

!IF "$(CFG)" != "try2 - Win32 Release" && "$(CFG)" != "try2 - Win32 Debug" && "$(CFG)" != "try2 - Win32 Logiscope"
!MESSAGE 指定的配置 "$(CFG)" 无效.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "try2.mak" CFG="try2 - Win32 Logiscope"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "try2 - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "try2 - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE "try2 - Win32 Logiscope" (based on "Win32 (x86) Console Application")
!MESSAGE
!ELSE
ERROR=An invalid configuration is specified.


!ENDIF

!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF

再用NMAKE发现通过了!

plus:这是vc++的nmake的Makefile生成的问题,不涉及到楼主所说的Logiscope的TestChecker。具体为什么自带的生成器会生成有语法错误的东西,我也不知道啦~~

MRAK~~~

读书人网 >C++

热点推荐