“LNK2026 模块对于 SAFESEH 映像是不安全的“原因以及解决方法
今天在编译一个程序时,出现了“LNK2026 模块对于 SAFESEH 映像是不安全的”的错误,stackoverflow上解释原因如下:
This happens when you link an .obj or .lib that contains code created by an earlier version of the compiler. Which of course would be common if you downloaded a binary for opencv_ffmpeg instead of the source. You can turn the linker option off but then you’ll still have a CRT version incompatibility that can byte. Rebuild the library from source.
It can also be caused by, as the error states, modules for which the linker can’t find safe exception handlers. Assembly language modules in particular
就是说你链接了一个使用较早版本编译器生成的.lib或者.obj文件,或者找不到“safe exception handlers”,才会报这个错误。
解决方法如下:项目->项目属性->链接器->命令行,在右侧其他选项中添加“/SAFESEH:NO”,这样就不会再报错了。
有关更多SAFESEH的信息可以看这里
参考链接:
https://stackoverflow.com/questions/10599940/module-unsafe-for-safeseh-image-c
https://www.cnblogs.com/hanxi/archive/2012/06/10/2544230.html
相关文章
- 毕业论文摘要的书写方法和技巧
- Java与.NET兼容的RSA密钥持久化方法
- sting.Contains()方法
- 【面试】Java集合篇--图解HashMap的put方法的具体流程
- 面向对象的 ABAP 编程初探 - 什么是类,实例,和 Public 方法
- Atitit 安全措施流程法 目录 1. 常见等安全措施方法2 1.1. 安全的语言 代码法,编译型 java2 1.2. 安全编码法2 1.3. 安全等框架类库 api2 1.4. 加密法
- Android Studio 查看方法在哪被调用
- CV:人工智能之计算机视觉方向的简介(CV发展史+传统方法对比CNN类算法+CV类会议/期刊、主要研究方向)、计算机视觉四大研究方向以及十大具体应用领域(知识导图+经典案例)之详细攻略
- Py之chatterbot-corpus:python包之chatterbot-corpus包简介、安装、使用方法之详细攻略
- 6种方法帮你搞定SimpleDateFormat类不是线程安全的问题