error LNK2026: SAFESEH

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

error LNK2026: SAFESEH

Postby lkitrossky » Wed Aug 19, 2015 3:01 pm

Hi! I have
Code: Select all
libeay32.lib(x86cpuid.obj) : error LNK2026: module unsafe for SAFESEH image
libeay32.lib is built by ourselves from OpenSSL source.
How to get rid of the error, please? I saw some recommendations to change GYP with 'ImageHasSafeExceptionHandlers': 0, but Python complained on unknown option, and it did not work for me. The lib was added in C++:
Code: Select all
#pragma comment (lib, "libeay32.lib")
but there is no pragma option to prevent /SAFESEH.
Both OpenSSL libeay32.lib and CEF uses Viual Studio 2013, linker succeedi in CEF_unittests, but not in the application itself for some reason. The issue turned to be a stumbling block in our project! Please, assist.
Thanks, Levi
lkitrossky
Mentor
 
Posts: 66
Joined: Tue Mar 24, 2015 7:26 am

Re: error LNK2026: SAFESEH

Postby lkitrossky » Thu Aug 20, 2015 4:36 am

It seems there is a solution. In cef.gyp add one line:
Code: Select all
 'ImageHasSafeExceptionHandlers': 'false'
resulting in:
Code: Select all
'msvs_settings': {
            'VCLinkerTool': {
              # Set /SUBSYSTEM:WINDOWS.
              'SubSystem': '2',
              'ImageHasSafeExceptionHandlers': 'false'   
            },
           ...
          },
The source of inspiration: https://github.com/joyent/node/issues/4242
Still remains unclear, why all this happened, both CEF application and OpenSSL have been built in VS 2013.
Levi
lkitrossky
Mentor
 
Posts: 66
Joined: Tue Mar 24, 2015 7:26 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 44 guests