使用VS2012编译libffi失败,并出现致命错误LNK1281:无法生成SAFESEH映像 [英] Compiling libffi with VS2012 fails with fatal error LNK1281: Unable to generate SAFESEH image

查看:588
本文介绍了使用VS2012编译libffi失败,并出现致命错误LNK1281:无法生成SAFESEH映像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用VS11编译libffi会出现以下链接器错误

Compiling libffi with VS11 gives the following linker error

libffi\libffi-3.0.9\ms\Win32\Debug\ffi.dll : fatal error LNK1281: Unable to generate SAFESEH image.

同一项目在VS10上编译正常,但是在VS2012自动升级后,它开始出现链接器错误

The same project was compiling fine with VS10, but after an auto upgrade with VS2012, it started giving linker error

MSDN 太神秘,最没有帮助

我可能会使用/SAFESEH:NO进行重建,但是我不确定其中的含义.

I might rebuild with /SAFESEH:NO , but I am unsure of the implication.

请告知可能出什么问题.

Please advise what might go wrong.

推荐答案

没有SAFESEH的主要含义是Windows 8商店或Windows 8桌面认证.如果这不是您的问题,请随时使用/SAFESEH:NO.

The main implication of not having SAFESEH is that your application won't be accepted for the Windows 8 store, or for Windows 8 desktop certification. If that's not an issue for you then feel free to use /SAFESEH:NO.

文档说:

链接器无法生成图像的最常见原因是,链接器的一个或多个输入文件(模块)与安全异常处理程序功能不兼容.模块与安全异常处理程序不兼容的常见原因是,它是使用Visual C ++早期版本的编译器创建的.

The most common reason for the linker not to be able to produce an image is because one or more of the input files (modules) to the linker was not compatible with the safe exception handlers feature. A common reason for a module to not be compatible with safe exception handlers is because it was created with a compiler from a previous version of Visual C++.

项目升级到VS2012是否有可能将设置更改为/SAFESEH:YES.也许您从未使用SAFESEH进行构建.

Is it possible that the project upgrade to VS2012 changed the setting to /SAFESEH:YES. Perhaps you've never been building with SAFESEH.

这篇关于使用VS2012编译libffi失败,并出现致命错误LNK1281:无法生成SAFESEH映像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆