使用 OpenSSL 库"___report_rangecheckfailure"构建错误
Build error with "___report_rangecheckfailure" with OpenSSL libs
使用vc++ 2010
使用OpenSSL库编译SHA512哈希…
得到这个构建错误:
1>------ Build started: Project: Second, Configuration: Debug Win32 ------
1> stdafx.cpp
1> AssemblyInfo.cpp
1>Second.cpp
1> Second.cpp(64): 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> C:Program Files (x86)Microsoft Visual Studio 10.0VCincludestdio.h(371) : see declaration of 'sprintf'
1> Generating Code...
1> .NETFramework,Version=v4.0.AssemblyAttributes.cpp
1> Microsoft (R) Incremental Linker Version 10.00.40219.01
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> "/OUT:C:UsersBossdocumentsvisual studio 2010ProjectsSecondDebugSecond.exe" /INCREMENTAL "C:Program FilesOpenSSL-Win32libVCstaticssleay32MD.lib" "C:Program FilesOpenSSL-Win32libVCstaticlibeay32MD.lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /ASSEMBLYRESOURCE:DebugSecond.Form1.resources /MANIFEST "/ManifestFile:DebugSecond.exe.intermediate.manifest" "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /DEBUG "/PDB:C:UsersBossdocumentsvisual studio 2010ProjectsSecondDebugSecond.pdb" /ASSEMBLYDEBUG /SUBSYSTEM:WINDOWS /TLBID:1 "/ENTRY:main" /DYNAMICBASE /FIXED:NO /NXCOMPAT /MACHINE:X86 Debugapp.res
1> DebugAssemblyInfo.obj
1> DebugSecond.obj
1> Debugstdafx.obj
1> "Debug.NETFramework,Version=v4.0.AssemblyAttributes.obj"
1>libeay32MD.lib(obj_dat.obj) : error LNK2019: unresolved external symbol ___report_rangecheckfailure referenced in function _OBJ_create_objects
1>libeay32MD.lib(b_print.obj) : error LNK2001: unresolved external symbol ___report_rangecheckfailure
1>C:UsersBossdocumentsvisual studio 2010ProjectsSecondDebugSecond.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
尝试禁用缓冲区溢出安全检查,相同错误…
任何想法吗?一整天都在用Crypto++,没有用,OpenSSL更容易,只是挂了这个错误…
看起来您正在尝试链接到使用较新版本的编译器构建的OpenSSL库。
函数__report_rangecheckfailure是在最近的Visual Studio版本中引入的(详细信息请参阅http://blogs.microsoft.com/cybertrust/2012/01/26/enhancements-to-gs-in-visual-studio-11/)。
所以链接器正在VS2010库中寻找一个直到后来才存在的函数。
至少一个预构建的Windows OpenSSL库的维护者最近从使用较早版本的Visual Studio切换到其他版本,这可能是引发您的问题的原因。
一种解决方案是使用VS2010构建自己的OpenSSL Windows二进制文件(例如参见http://developer.covenanteyes.com/building-openssl-for-visual-studio/)。
相关文章:
- Agora.io 虚幻引擎插件构建错误
- 尝试将 boost::stacktrace 添加到 CMake 项目时出现构建错误
- Arch Linux.AUR 包 mysql 不能用 makepkg 构建.错误:构建 () 中出现故障
- 组件上的虚幻引擎可蓝图UFUNCTION会导致构建错误
- 尝试构建 xerces c++ 解析器。Netbeans 和命令行构建错误未定义对"xercesc_3_2..."的引用
- pair的两个构造函数几乎相同,为什么不生成构建错误?
- 发生 Qt5.11 应用插件构建错误:信号和插槽参数不兼容
- Visual Studio 2017 中的 Tesseract 3.05 构建错误
- Eclipse 构建错误在默认的 hello world 上
- C++ CMake 构建错误:未定义对"boost::throw_exception(std::exception const&)"的引用
- 在 solaris 上增加 1.64 构建错误
- xgboost 构建错误:参数包未扩展为"..":
- 使用GCC 4.8构建错误:数组用作初始化器
- 编译 Java TD 客户端时出现构建错误
- 如何修复安卓工作室中的NDK构建错误
- C++ Cassandra 构建错误
- 我在 MinGW 和 VS 代码"g++ not recognized as a cmdlet..."时遇到构建错误
- Microsoft Visual Studio 2008,版本9.0.30739.1 SP,DLL构建错误
- 使用PPConsul(C 的领事客户端)构建错误的C 项目
- WURFL nginx 构建错误