项目警告会阻止生成lib文件

时间:2011-05-03 07:53:59

标签: visual-studio-2008 linker warnings

在编译期间,仅报告警告。在项目设置中,“未将警告视为错误”已取消选中。但是.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 ==========

1 个答案:

答案 0 :(得分:1)

你的链接器说它找不到输入'pmwscmn.lib'。

这是为了构建pcwscommon的输出所必需的。

无论哪个项目构建'pmwscmn.lib'还没有运行(您可能缺少依赖项),或者已经失败,或者pmwscmn.lib是二进制文件,它不在您的lib路径中。

相关问题