2011-05-03 48 views
1

編譯期間,只會報告警告。在項目設置中,「將警告視爲錯誤」未被選中。但.lib文件沒有得到生成,並且鏈接失敗。以下是我的構建日誌。請幫忙。項目警告會阻止生成lib文件

1>------ Build started: Project: pcwscommon, Configuration: Release Win32 ------ 
1>Compiling... 
1>stdafx.cpp 
1>Compiling... 
1>wsxmlvld.cpp 
1>e:\ws_name\eBiz\powrmart\sdk\include\sdkcmn/ivector.hpp(49) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
1>  e:\Program Files\Microsoft Visual Studio 9.0\VC\include\../include/string.h(74) : see declaration of 'strcpy' 
1>e:\ws_name\ebiz\powrmart\common\cmnmisc\pmn2s.hpp(364) : warning C4351: new behavior: elements of array 'PmI64Str::m_buf' will be default initialized 
1>e:\ws_name\ebiz\powrmart\common\cmnmisc\pmtstring.hpp(280) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
1>  e:\Program Files\Microsoft Visual Studio 9.0\VC\include\../include/stdio.h(366) : see declaration of 'sprintf' 
1>  e:\ws_name\ebiz\powrmart\common\cmnmisc\pmtstring.hpp(298) : see reference to function template instantiation 'PM_LEN pmtFtoa<char>(double,CCC *,PM_BOOLEAN)' being compiled 
1>  with 
1>  [ 
1>   CCC=char 
1>  ] 
1>e:\ws_name\ebiz\powrmart\common\cmnmisc\pmtstring.hpp(292) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
1>  e:\Program Files\Microsoft Visual Studio 9.0\VC\include\../include/stdio.h(366) : see declaration of 'sprintf' 
1>e:\ws_name\ebiz\powrmart\common\cmnmisc\pmtstring.hpp(240) : warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _stricmp. See online help for details. 
1>  e:\Program Files\Microsoft Visual Studio 9.0\VC\include\../include/string.h(215) : see declaration of 'stricmp' 
1>  e:\ws_name\eBiz\powrmart\common\cmnmisc\pmdate.hpp(715) : see reference to function template instantiation 'int pmtStricmpAscii<char>(const CCC *,const char *)' being compiled 
1>  with 
1>  [ 
1>   CCC=char 
1>  ] 
1>wsxmlreptbl.cpp 
1>e:\ws_name\ebiz\powrmart\common\cmnmisc\pmn2s.hpp(364) : warning C4351: new behavior: elements of array 'PmI64Str::m_buf' will be default initialized 
1>e:\ws_name\eBiz\powrmart\sdk\include\sdkcmn/ivector.hpp(49) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
1>  e:\Program Files\Microsoft Visual Studio 9.0\VC\include\../include/string.h(74) : see declaration of 'strcpy' 
1>e:\ws_name\ebiz\powrmart\common\cmnmisc\pmtstring.hpp(280) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
1>  e:\Program Files\Microsoft Visual Studio 9.0\VC\include\../include/stdio.h(366) : see declaration of 'sprintf' 
1>  e:\ws_name\ebiz\powrmart\common\cmnmisc\pmtstring.hpp(298) : see reference to function template instantiation 'PM_LEN pmtFtoa<char>(double,CCC *,PM_BOOLEAN)' being compiled 
1>  with 
1>  [ 
1>   CCC=char 
1>  ] 
1>e:\ws_name\ebiz\powrmart\common\cmnmisc\pmtstring.hpp(292) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 
1>  e:\Program Files\Microsoft Visual Studio 9.0\VC\include\../include/stdio.h(366) : see declaration of 'sprintf' 
1>e:\ws_name\ebiz\powrmart\common\cmnmisc\pmtstring.hpp(240) : warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _stricmp. See online help for details. 
1>  e:\Program Files\Microsoft Visual Studio 9.0\VC\include\../include/string.h(215) : see declaration of 'stricmp' 
1>  e:\ws_name\eBiz\powrmart\common\cmnmisc\pmdate.hpp(715) : see reference to function template instantiation 'int pmtStricmpAscii<char>(const CCC *,const char *)' being compiled 
1>  with 
1>  [ 
1>   CCC=char 
1>  ] 
1>Generating Code... 
1>Linking... 
1>LINK : fatal error LNK1181: cannot open input file 'pmwscmn.lib' 
1>Build log was saved at "file://e:\ws_name\eBiz\main\pcws\common\Release\BuildLog.htm" 
1>pcwscommon - 1 error(s), 10 warning(s) 
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 
+0

您涉及的項目有哪些?什麼創造什麼/依靠什麼?什麼是pmwscmn.lib?/什麼項目創建它?您的鏈接錯誤與pcwscommon項目是不同的?這是否工作在調試配置? – forsvarir 2011-05-03 08:01:05

+0

pcwscommon是正在構建的項目名稱。該項目是解決方案中的許多其他項目之一,我有選擇地構建該項目。它應該生成.lib文件。調試版本也會因相同的錯誤而失敗。 – 2011-05-03 08:31:41

+0

你的連接器說它找不到輸入'pmwscmn.lib'。這是爲了建立pcwscommon的輸出所必需的。無論構建「pmwscmn.lib」的任何項目是否尚未運行(可能缺少依賴項),或者失敗,或者pmwscmn.lib都是二進制文件,它不在您的lib路徑中。 – forsvarir 2011-05-03 08:33:40

回答

1

你的連接器是說它找不到輸入'pmwscmn.lib'。

這是爲了構建pcwscommon的輸出而需要的。

無論哪個項目構建'pmwscmn.lib'要麼還沒有運行(您可能缺少依賴關係),或者失敗了,或者pmwscmn.lib是一個二進制文件,它不在您的lib路徑中。