當正在修建的我CPP文件中的一個的設置: 的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)