使用命令行编译时,为什么没有构建我的CPP文件之一

时间:2011-07-07 19:20:40

标签: visual-studio sybase-asa

设置: Windows XP MS VisualStudio 2003 Sybase SQL Anywhere 9 嵌入式SQL(我知道......但这是一个非常古老的项目)

这个项目就像我在这里遇到的许多其他人一样。 SQL预编译器处理SQC文件以生成CPP文件,然后将其编译为OBJ并最终链接到DLL的一部分。

使用GUI开发环境时,没有问题。每次每台机器都能成功构建解决方案。

从命令行构建时,结果似乎取决于计算机/环境。实际上,我最初能够成功地在命令行上成功编译项目。现在,我也遇到了问题。

我检查了路径的四倍。和设置。它看起来就像任何其他具有此类设置的项目。路径有效。我拥有整个系统的管理员权限。生成的文件不是只读的或签入RCS。当我清理时,文件将被删除,包括CPP。 CPP不会从项目的构建中排除。

根据我的发现,生成的CPP文件已创建并位于应该存在的位置,但不会添加到编译器响应文件中。所以从来没有建立过CPP。但链接器响应文件在其列表中包含OBJ。由于文件不存在,因为它没有编译,因此无法链接。

我已经没有其他可能导致此问题的想法。

命令:

"C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\..\ide\devenv.com" C:\workspaces\Borg\Main\_build\..\BioID\BioID.sln /build Release /out C:\workspaces\Borg\Main\_build\..\_build\output\visualstudio.log

导致以下BuildLog.htm。路径完全按照我们的构建脚本使用nant定义,因此我可以直接重新创建问题。

------- Build started: Project: PyxPosId, Configuration: Release|Win32 -------

 Command Lines      Creating temporary file "c:\workspaces\Borg\Main\BioID\Release\BAT000001.bat" with contents
[
@echo off
sqlpp -o WINNT -r "c:\workspaces\Borg\Main\BioID\SQLBIO.SQC" "c:\workspaces\Borg\Main\BioID\SQLBIO".cpp

if errorlevel 1 goto VCReportError
goto VCEnd
:VCReportError
echo Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
exit 1
:VCEnd
]
Creating command line "c:\workspaces\Borg\Main\BioID\Release\BAT000001.bat"
Creating temporary file "c:\workspaces\Borg\Main\BioID\Release\RSP000002.rsp" with contents
[
/O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /FD /EHsc /MT /YX"stdafx.h" /Fp".\PyxPosId___Win32_Release_Sybase9/BioId.pch" /Fo".\PyxPosId___Win32_Release_Sybase9/" /Fd".\PyxPosId___Win32_Release_Sybase9/" /W3 /c /TP
.\VXBio.cpp
.\VFSbio.cpp
.\VBioDlg.cpp
.\USTDREG.CPP
.\USTDNEW.CPP
.\STDREG.CPP
.\STDNEW.CPP
.\SetupConfigPage.cpp
.\SCCfgDlg.cpp
.\ScanId.cpp
.\pyxsheet.cpp
.\PyxPosId.cpp
.\MsgBox.cpp
.\FTbio.cpp
.\FIUBIO.CPP
.\DevTypePg.cpp
.\CGray8Dib.cpp
.\CardScan.cpp
.\bioutils.cpp
.\BioSet.cpp
.\BioDb.cpp
.\BIO.CPP
.\APPSRC.CPP
]
Creating command line "cl.exe @c:\workspaces\Borg\Main\BioID\Release\RSP000002.rsp /nologo"
Creating temporary file "c:\workspaces\Borg\Main\BioID\Release\RSP000003.rsp" with contents
[
/O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "_WINDLL" /FD /EHsc /MT /Yc"stdafx.h" /Fp".\PyxPosId___Win32_Release_Sybase9/BioId.pch" /Fo".\PyxPosId___Win32_Release_Sybase9/" /Fd".\PyxPosId___Win32_Release_Sybase9/" /W3 /c /TP
.\StdAfx.cpp
]
Creating command line "cl.exe @c:\workspaces\Borg\Main\BioID\Release\RSP000003.rsp /nologo"
Creating command line "rc.exe /d "NDEBUG" /l 0x409 /fo"Release/BIO.res" .\BIO.RC"
Creating temporary file "c:\workspaces\Borg\Main\BioID\Release\RSP000004.rsp" with contents
[
/OUT:"PyxPosId___Win32_Release_Sybase9/Pyxposid.dll" /INCREMENTAL:NO /NOLOGO /DLL /NODEFAULTLIB:"libc.lib" /NODEFAULTLIB:"LIBCMTD" /DEF:".\PyxPosId.def" /DELAYLOAD:"OleAcc.dll" /PDB:".\PyxPosId___Win32_Release_Sybase9/Pyxposid.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:".\PyxPosId___Win32_Release_Sybase9/Pyxposid.lib" /MACHINE:X86 NAFXCW.LIB  dblibtm.lib dpfpfns.lib dpmatch.lib  vxapi.lib DelayImp.lib DelayImp.lib
.\pyxposid___win32_release_sybase9\APPSRC.obj
.\pyxposid___win32_release_sybase9\BIO.obj
.\Release\BIO.res
.\pyxposid___win32_release_sybase9\BioDb.obj
.\pyxposid___win32_release_sybase9\BioSet.obj
.\pyxposid___win32_release_sybase9\bioutils.obj
.\pyxposid___win32_release_sybase9\CardScan.obj
.\pyxposid___win32_release_sybase9\CGray8Dib.obj
.\pyxposid___win32_release_sybase9\DevTypePg.obj
.\pyxposid___win32_release_sybase9\FIUBIO.obj
.\pyxposid___win32_release_sybase9\FTbio.obj
.\pyxposid___win32_release_sybase9\MsgBox.obj
.\pyxposid___win32_release_sybase9\PyxPosId.obj
.\pyxposid___win32_release_sybase9\pyxsheet.obj
.\pyxposid___win32_release_sybase9\ScanId.obj
.\pyxposid___win32_release_sybase9\SCCfgDlg.obj
.\pyxposid___win32_release_sybase9\SetupConfigPage.obj
.\pyxposid___win32_release_sybase9\Sqlbio.obj
.\pyxposid___win32_release_sybase9\StdAfx.obj
.\pyxposid___win32_release_sybase9\STDNEW.obj
.\pyxposid___win32_release_sybase9\STDREG.obj
.\pyxposid___win32_release_sybase9\USTDNEW.obj
.\pyxposid___win32_release_sybase9\USTDREG.obj
.\pyxposid___win32_release_sybase9\VBioDlg.obj
.\pyxposid___win32_release_sybase9\VFSbio.obj
.\pyxposid___win32_release_sybase9\VXBio.obj
]
Creating command line "link.exe @c:\workspaces\Borg\Main\BioID\Release\RSP000004.rsp"
 Output Window      Performing Custom Build Step
Adaptive Server Anywhere Embedded SQL Version 9.0.2.3169
Using collation sequence "1252LATIN1"
c:/workspaces/Borg/Main/BioID/SQLBIO.SQC(715): Warning! W2665 near ';': host variable 'hvuserIid' has been redefined
Compiling...
StdAfx.cpp
 WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
Compiling...
VXBio.cpp
 WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
VXBio.cpp(818) : warning C4244: '=' : conversion from '__time64_t' to 'time_t', possible loss of data
VFSbio.cpp
**OPTION** WIN32=Building for 32-bit Windows
VBioDlg.cpp
 WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
**OPTION** WIN32=Building for 32-bit Windows
USTDREG.CPP
 WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
**OPTION** WIN32=Building for 32-bit Windows
USTDNEW.CPP
**OPTION** WIN32=Building for 32-bit Windows
STDREG.CPP
 WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
**OPTION** WIN32=Building for 32-bit Windows
STDNEW.CPP
**OPTION** WIN32=Building for 32-bit Windows
SetupConfigPage.cpp
 WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
**OPTION** WIN32=Building for 32-bit Windows
SCCfgDlg.cpp
 WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
ScanId.cpp
pyxsheet.cpp
PyxPosId.cpp
MsgBox.cpp
FTbio.cpp
FIUBIO.CPP
 WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
FIUBIO.CPP(1456) : warning C4244: '=' : conversion from '__time64_t' to 'time_t', possible loss of data
DevTypePg.cpp
 WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
CGray8Dib.cpp
CardScan.cpp
 WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
bioutils.cpp
 WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
BioSet.cpp
 WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
BioDb.cpp
BioDb.cpp(508) : warning C4244: '=' : conversion from '__time64_t' to 'time_t', possible loss of data
BIO.CPP
 WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
**OPTION** WIN32=Building for 32-bit Windows
BIO.CPP(1202) : warning C4244: '=' : conversion from '__time64_t' to 'time_t', possible loss of data
BIO.CPP(1319) : warning C4244: '=' : conversion from '__time64_t' to 'time_t', possible loss of data
APPSRC.CPP
 WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
Compiling resources...
Linking...
LINK : fatal error LNK1181: cannot open input file '.\pyxposid___win32_release_sybase9\Sqlbio.obj'
 Results      Build log was saved at "file://c:\workspaces\Borg\Main\BioID\Release\BuildLog.htm"
PyxPosId - 1 error(s), 5 warning(s) 

1 个答案:

答案 0 :(得分:1)

显然,存在区分大小写问题。我停止使用$(InputName)并在我的vcproj中对该名称进行了硬编码以匹配任何地方。

大家都知道,我不打算在MS的8年开发环境中打开故障单。