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 ==========
您涉及的项目有哪些?什么创造什么/依靠什么?什么是pmwscmn.lib?/什么项目创建它?您的链接错误与pcwscommon项目是不同的?这是否工作在调试配置? – forsvarir 2011-05-03 08:01:05
pcwscommon是正在构建的项目名称。该项目是解决方案中的许多其他项目之一,我有选择地构建该项目。它应该生成.lib文件。调试版本也会因相同的错误而失败。 – 2011-05-03 08:31:41
你的连接器说它找不到输入'pmwscmn.lib'。这是为了建立pcwscommon的输出所必需的。无论构建“pmwscmn.lib”的任何项目是否尚未运行(可能缺少依赖项),或者失败,或者pmwscmn.lib都是二进制文件,它不在您的lib路径中。 – forsvarir 2011-05-03 08:33:40