0

设置:Windows XP MS VisualStudio 2003 Sybase SQL Anywhere 9 Embedded 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) 
4

1 回答 1

1

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

正如你们都知道的那样,我不会为一个有 8 年历史的开发环境向 MS 开故障单。

于 2011-11-09T17:18:35.360 回答