文件名,目录名或卷标语法不正确

时间:2016-03-08 14:49:44

标签: batch-file makefile nmake

当我在命令提示符下运行此.bat文件时,它会抛出一个错误,即"文件名,目录名或卷标语法不正确"。

批处理文件包含 -

nmake /nologo /f makefile /a
pause

makefile包含以下内容:

# nmake makefile to build a sample ADK MAC compliant application 
# NOTE: EOSSDK is needed to resolve ADK Library references and header file includes  

VRXSDK = C:\eVoAps\SDK\1.2.0\VRXSDK
#VXEOS = C:\eVoAps\EOSSDK\2.1.4
ADK = C:\eVoAps\ADK
VSFSTOOL = C:\Program Files\VERIFONE\FST

VRXIncludes = $(VRXSDK)\include
ADKIncludes = $(ADK)\VRX\Include
EOSIncludes = $(EOSSDKNEW)\include\ssl2

IncDir = .\Source
SrcDir = .\Source
ObjDir = .\Objects
OutDir = .\Download

EOSObjects  = C:\eVoAps\SDK\1.2.0\EOSSDKNEW\lib
Includes = -I$(IncDir) -I$(VRXIncludes) -I$(EOSIncludes) -I$(ADKIncludes) -I$(SrcDir) 

# Compiler options 
# Ignoring warning 1295 - Deprecated declaration - give arg types
# Defiing _VRXEVO for Verix specific code in the sample.  
COptions = -vsoapp -g -p -armcc,"--diag_suppress 1295" -D _VRXEVO -DLOGAPI_ENABLE_DEBUG -DVFI_GUIPRT_IMPORT -DVFI_MAC_DLL_IMPORT -DVFI_IPC_DLL_IMPORT -DVFI_SYSINFO_DLL_IMPORT -DVFI_SYSBAR_DLL_IMPORT
LinkOptions = -vsoapp -g -p 

# NOTE: elog.o required to resolve references in the ADK libs.  Log lib requires STL
# LibVFIMac only needed to resolve sysShowDesktop()
# svc_net.o required for mac library....
Libs = $(ADK)\vrx\lib\libvfiguiprt.so \
    $(ADK)\vrx\lib\libvfiipc.so \
    $(ADK)\vrx\lib\liblog.so\
    $(ADK)\vrx\lib\libvfimac.so \
    $(VRXSDK)\lib\vxstl.so  \
    $(EOSSDKNEW)\lib\svc_net.o \
    $(EOSSDKNEW)\lib\elog.o 

AppObjects = $(ObjDir)\BossApp.o

$(OutDir)\BossApp.vsa.p7s : $(OutDir)\BossApp.vsa
    "$(VSFSTOOL)\FST" BossApp.fst

$(OutDir)\BossApp.vsa : $(AppObjects)
    $(VRXSDK)\bin\vrxcc $(AppObjects) $(Libs) -o $@
    $(VRXSDK)\bin\vrxhdr -s 128000 -h 128000 -l ELOG.LIB=N:/ELOG.LIB -l NET.LIB=N:/NET.LIB 
    $(OutDir)\BossApp.vsa

######  Compile #######
$(ObjDir)\BossApp.o : $(SrcDir)\BossApp.cpp
    $(VRXSDK)\bin\vrxcc -c $(Includes) $(COptions) -o $(ObjDir)\BossApp.o $(SrcDir)\BossApp.cpp

我无法弄清楚我在这里失踪了什么。请帮助我。

2 个答案:

答案 0 :(得分:0)

此过程不是在Windows批处理中编写的。它需要以Windows批处理语言编写,以便由cmd.exe处理。

答案 1 :(得分:0)

这很可能是百分之几的人的原因,但是我从计算机上的任何.BAT文件(应该是Windows Server 2019)中得到了此错误。就我而言,出现错误是因为我最近安装了ConEmu(控制台替换应用程序)并将其设置为集成模式(在其中替换了常规CMD应用程序),并且无法正确启动.BAT文件。关闭ConEmu的集成模式后,我的.BAT文件再次开始工作。