项目警告阻止生成 lib 文件

发布于 2024-11-04 08:54:46 字数 4905 浏览 1 评论 0原文

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

During compilation, there are only warnings reported. In project settings "Treat warnings as errors" has been unchecked. But the .lib file is not getting generated and the linking fails. Below is my build log. Please help.

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 ==========

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜心 2024-11-11 08:54:46

您的链接器说它找不到输入“pmwscmn.lib”。

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

无论哪个项目构建“pmwscmn.lib”,要么尚未运行(您可能缺少依赖项),要么已失败,或者 pmwscmn.lib 是二进制文件,不在您的 lib 路径中。

You linker is saying it can't find input 'pmwscmn.lib'.

This is needed in order for the output from pcwscommon to be built.

Whichever project builds 'pmwscmn.lib' either hasn't been run yet (you may be missing dependencies), or has failed, or pmwscmn.lib is a binary, that isn't in your lib path.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文