OSQA is unmaintained. Help us figure out where to go from here.

I am trying to build a new wireshark environment on Win 8.1\WIN32, running msbuild /m /p:Configuration=RelWithDebInfo Wireshark.sln and got this error:

118>libqtmain.a(qtmain_win.o) : error LNK2026: module unsafe for SAFESEH image. [C:\Users\hshoham\Downloads\wsbuild32\wireshark.vcxproj]
118>C:\Users\hshoham\Downloads\wsbuild32\run\RelWithDebInfo\Wireshark.exe : fatal error LNK1281: Unable to generate SAFESEH image. [C:\Users\hshoham\Downloads\wsbuild32\wireshark.vcxproj]

asked 09 Jan '16, 05:04

Hadar's gravatar image

Hadar
6113
accept rate: 0%

edited 09 Jan '16, 07:20

grahamb's gravatar image

grahamb ♦
19.7k330205

What version of Visual Studio are you using and what version of Wireshark, from master or another branch or a tarball?

(09 Jan '16, 07:20) grahamb ♦

Also, I think having libqtmain.a in a link command is a bit odd. Windows uses .lib files for import linking, and the object files in them would be .obj. What version of Qt are you using, are you sure you have installed the Windows version appropriate for your version of Visual Studio.

Please run the CMake generation step redirecting the output to a file and paste that files contents here, e.g. CMake ... > cmake.txt.

(09 Jan '16, 07:25) grahamb ♦
  1. VS 12.0
  2. wireshark master (with out any changes, yet)

-- Generating build using CMake 3.4.1 -- Building for win32 using Visual Studio 12 2013 Working in C:\Users\hshoham\Downloads\Wireshark\wireshark-win32-libs

Tag 2015-12-11 found. Skipping.

-- No custom file found in C:/Users/hshoham/Downloads/Wireshark -- Configuration types: Debug;Release;MinSizeRel;RelWithDebInfo -- CMAKE_C_FLAGS_RELWITHDEBINFO: /MD /Zi /O2 /Ob1 /D NDEBUG -- CMAKE_CXX_FLAGS_RELWITHDEBINFO: /MD /Zi /O2 /Ob1 /D NDEBUG -- V: 2.1.0-Hadar_Shoham, MaV: 2, MiV: 1, PL: 0, EV: -Hadar_Shoham. -- Checking for c-compiler flag: /MP -- Checking for c-compiler flag: /Zo -- Checking for c-compiler flag: /w34295 /w34189 -- Checking for c++-compiler flag: /MP -- Checking for c++-compiler flag: /Zo -- Checking for c++-compiler flag: /w34295 /w34189 -- Packagelist: AIRPCAP;CAP;CARES;GCRYPT;GEOIP;GLIB2;GMODULE2;GNUTLS;GTHREAD2;GTK2;Gettext;HtmlViewer;KERBEROS;LEX;LIBSSH;LUA;M;PCAP;POD;PORTAUDIO;Perl;PythonInterp;Qt5Core;Qt5LinguistTools;Qt5Multimedia;Qt5PrintSupport;Qt5Svg;Qt5Widgets;Qt5WinExtras;SBC;SED;SETCAP;SH;SMI;WINSPARKLE;YACC;YAPP;ZLIB -- AIRPCAP FOUND -- AIRPCAP includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/AirPcap_Devpack_4_1_0_1622/Airpcap_Devpack/include -- AIRPCAP libs: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/AirPcap_Devpack_4_1_0_1622/Airpcap_Devpack/lib/airpcap.lib -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'libcap' -- Could NOT find CAP (missing: CAP_LIBRARY CAP_INCLUDE_DIR) -- CAP NOT FOUND -- CARES FOUND -- CARES includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/c-ares-1.9.1-1-win32ws/include -- CARES libs: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/c-ares-1.9.1-1-win32ws/lib/libcares-2.lib -- GCRYPT FOUND -- GCRYPT includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gnutls-3.2.15-2.7-win32ws/include -- GCRYPT libs: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gnutls-3.2.15-2.7-win32ws/bin/libgcrypt-20.lib;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gnutls-3.2.15-2.7-win32ws/bin/libgpg-error-0.lib -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'geoip' -- GEOIP FOUND -- GEOIP includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/GeoIP-1.6.6-win32ws/include -- GEOIP libs: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/GeoIP-1.6.6-win32ws/lib/libGeoIP-1.lib -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'glib-2.0>=2.14.0' -- GLIB2 FOUND -- GLIB2 includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/include/glib-2.0;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/glib-2.0/include -- GLIB2 libs: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/glib-2.0.lib -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'gmodule-2.0' -- GMODULE2 FOUND -- GMODULE2 includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/include/glib-2.0 -- GMODULE2 libs: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/gmodule-2.0.lib -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'gnutls' -- GNUTLS FOUND -- GNUTLS includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gnutls-3.2.15-2.7-win32ws/include -- GNUTLS libs: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gnutls-3.2.15-2.7-win32ws/bin/libgnutls-28.lib -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'gthread-2.0' -- GTHREAD2 FOUND -- GTHREAD2 includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/include/glib-2.0/glib -- GTHREAD2 libs: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/gthread-2.0.lib -- GTK2 FOUND -- GTK2 includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/include/gtk-2.0;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/include;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/include/freetype2;C:/Tcl/include;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/include/glib-2.0;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/glib-2.0/include;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/include/atk-1.0;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/include/gdk-pixbuf-2.0;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/include/cairo;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/include/pango-1.0;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/gtk-2.0/include -- GTK2 libs: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/glib-2.0.lib;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/gobject-2.0.lib;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/atk-1.0.lib;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/gio-2.0.lib;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/gthread-2.0.lib;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/gmodule-2.0.lib;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/gdk_pixbuf-2.0.lib;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/cairo.lib;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/pango-1.0.lib;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/pangocairo-1.0.lib;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/pangoft2-1.0.lib;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/gdk-win32-2.0.lib;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/gtk2/lib/gtk-win32-2.0.lib -- Could NOT find Gettext (missing: GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE) -- GETTEXT NOT FOUND -- HTML_VIEWER NOT FOUND -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'krb5;mit-krb5;heimdal-krb5' -- KERBEROS FOUND -- KERBEROS includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/kfw-3-2-2-i386-ws-vc6/include -- KERBEROS libs: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/kfw-3-2-2-i386-ws-vc6/lib/krb5_32.lib -- LEX FOUND -- LEX includes: -- LEX libs: -- LEX executable: C:/ProgramData/chocolatey/lib/Cygwin/tools/cygwin/bin/flex.exe -- Could NOT find LIBSSH (missing: LIBSSH_LIBRARIES LIBSSH_INCLUDE_DIRS LIBSSH_VERSION) (Required is at least version "0.6") -- LIBSSH NOT FOUND -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'lua5.2;lua-5.2;lua52;lua5.1;lua-5.1;lua51;lua5.0;lua-5.0;lua50' -- Checking for one of the modules 'lua<=5.2.99' -- LUA FOUND -- LUA includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/lua5.2.3/include -- LUA libs: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/lua5.2.3/lua52.lib -- Could NOT find M (missing: M_LIBRARY) -- M NOT FOUND -- PCAP FOUND -- PCAP includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/WpdPack/Include -- PCAP libs: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/WpdPack/Lib/wpcap.lib -- POD FOUND -- POD includes: -- POD libs: -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Checking for one of the modules 'portaudio-2.0' -- PORTAUDIO FOUND -- PORTAUDIO includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/portaudio_v19_2/include;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/portaudio_v19_2/src/common;C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/portaudio_v19_2/src/os/win -- PORTAUDIO libs: -- PERL FOUND -- Perl includes: -- Perl libs: -- Perl executable: C:/ProgramData/chocolatey/lib/Cygwin/tools/cygwin/bin/perl.exe -- PYTHONINTERP FOUND -- PythonInterp includes: -- PythonInterp libs: -- Qt5Core FOUND -- Qt5Core includes: C:/Qt/5.5/mingw492_32/include/;C:/Qt/5.5/mingw492_32/include/QtCore;C:/Qt/5.5/mingw492_32/.//mkspecs/win32-g++ -- Qt5Core libs: Qt5::Core -- Qt5Core definitions: -DQT_CORE_LIB -- Qt5LinguistTools FOUND -- Qt5LinguistTools includes: -- Qt5LinguistTools libs: -- Qt5Multimedia FOUND -- Qt5Multimedia includes: C:/Qt/5.5/mingw492_32/include/;C:/Qt/5.5/mingw492_32/include/QtMultimedia;C:/Qt/5.5/mingw492_32/include/QtNetwork;C:/Qt/5.5/mingw492_32/include/QtCore;C:/Qt/5.5/mingw492_32/.//mkspecs/win32-g++;C:/Qt/5.5/mingw492_32/include/QtGui -- Qt5Multimedia libs: Qt5::Multimedia -- Qt5Multimedia definitions: -DQT_MULTIMEDIA_LIB;-DQT_NETWORK_LIB;-DQT_CORE_LIB;-DQT_GUI_LIB -- Qt5PrintSupport FOUND -- Qt5PrintSupport includes: C:/Qt/5.5/mingw492_32/include/;C:/Qt/5.5/mingw492_32/include/QtPrintSupport;C:/Qt/5.5/mingw492_32/include/QtWidgets;C:/Qt/5.5/mingw492_32/include/QtGui;C:/Qt/5.5/mingw492_32/include/QtCore;C:/Qt/5.5/mingw492_32/.//mkspecs/win32-g++ -- Qt5PrintSupport libs: Qt5::PrintSupport -- Qt5PrintSupport definitions: -DQT_PRINTSUPPORT_LIB;-DQT_WIDGETS_LIB;-DQT_GUI_LIB;-DQT_CORE_LIB -- Qt5Svg FOUND -- Qt5Svg includes: C:/Qt/5.5/mingw492_32/include/;C:/Qt/5.5/mingw492_32/include/QtSvg;C:/Qt/5.5/mingw492_32/include/QtWidgets;C:/Qt/5.5/mingw492_32/include/QtGui;C:/Qt/5.5/mingw492_32/include/QtCore;C:/Qt/5.5/mingw492_32/.//mkspecs/win32-g++ -- Qt5Svg libs: Qt5::Svg -- Qt5Svg definitions: -DQT_SVG_LIB;-DQT_WIDGETS_LIB;-DQT_GUI_LIB;-DQT_CORE_LIB -- Qt5Widgets FOUND -- Qt5Widgets includes: C:/Qt/5.5/mingw492_32/include/;C:/Qt/5.5/mingw492_32/include/QtWidgets;C:/Qt/5.5/mingw492_32/include/QtGui;C:/Qt/5.5/mingw492_32/include/QtCore;C:/Qt/5.5/mingw492_32/.//mkspecs/win32-g++ -- Qt5Widgets libs: Qt5::Widgets -- Qt5Widgets definitions: -DQT_WIDGETS_LIB;-DQT_GUI_LIB;-DQT_CORE_LIB -- Qt5WinExtras FOUND -- Qt5WinExtras includes: C:/Qt/5.5/mingw492_32/include/;C:/Qt/5.5/mingw492_32/include/QtWinExtras;C:/Qt/5.5/mingw492_32/include/QtGui;C:/Qt/5.5/mingw492_32/include/QtCore;C:/Qt/5.5/mingw492_32/.//mkspecs/win32-g++ -- Qt5WinExtras libs: Qt5::WinExtras -- Qt5WinExtras definitions: -DQT_WINEXTRAS_LIB;-DQT_GUI_LIB;-DQT_CORE_LIB -- Could NOT find SBC (missing: SBC_INCLUDE_DIR SBC_LIBRARY) -- SBC NOT FOUND -- SED FOUND -- SED includes: -- SED libs: -- SED executable: C:/ProgramData/chocolatey/lib/Cygwin/tools/cygwin/bin/sed.exe -- Could NOT find SETCAP (missing: SETCAP_EXECUTABLE) -- SETCAP NOT FOUND -- SH FOUND -- SH includes: -- SH libs: -- SH executable: C:/ProgramData/chocolatey/lib/Cygwin/tools/cygwin/bin/bash.exe -- SMI FOUND -- SMI includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/libsmi-svn-40773-win32ws/include -- SMI libs: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/libsmi-svn-40773-win32ws/lib/libsmi-2.lib -- WINSPARKLE FOUND -- WINSPARKLE includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/WinSparkle-0.3-44-g2c8d9d3-win32ws -- WINSPARKLE libs: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/WinSparkle-0.3-44-g2c8d9d3-win32ws/WinSparkle.lib -- YACC FOUND -- YACC includes: -- YACC libs: -- YACC executable: C:/ProgramData/chocolatey/lib/Cygwin/tools/cygwin/bin/bison.exe -- Could NOT find YAPP (missing: YAPP_EXECUTABLE) -- YAPP NOT FOUND -- ZLIB FOUND -- ZLIB includes: C:/Users/hshoham/Downloads/Wireshark/wireshark-win32-libs/zlib-1.2.8-ws;C:/Users/hshoham/Downloads/wsbuild32/zlib -- ZLIB libs: zlib -- C-Flags: /MP /Zo /w34295 /w34189 /DWIN32 /D_WINDOWS /W3 -- CXX-Flags: /MP /Zo /w34295 /w34189 /DWIN32 /D_WINDOWS /W3 /GR /EHsc -- Warnings as errors: /WX -- No custom file found in C:/Users/hshoham/Downloads/Wireshark/asn1 -- Using Cygwin a2x -- No custom file found in C:/Users/hshoham/Downloads/Wireshark/epan -- No custom file found in C:/Users/hshoham/Downloads/Wireshark/ui/gtk -- docdir: -- -- The following OPTIONAL packages have been found:

  • AIRPCAP
  • CARES
  • GCRYPT (required version >= 1.4.2)
  • GEOIP
  • GMODULE2
  • GNUTLS (required version >= 2.12.0)
  • GTK2
  • HtmlViewer
  • KERBEROS
  • LUA
  • PCAP
  • POD
  • PORTAUDIO
  • Perl
  • Qt5Core
  • Qt5LinguistTools
  • Qt5Network (required version >= 5.5.1)
  • Qt5Gui (required version >= 5.5.1)
  • Qt5Multimedia
  • Qt5PrintSupport
  • Qt5Svg
  • Qt5Widgets
  • Qt5WinExtras
  • SH
  • SMI
  • WINSPARKLE
  • ZLIB
  • LYNX
  • SED
  • XSLTPROC
  • XMLLINT
  • ASCIIDOC
  • PythonInterp

-- The following REQUIRED packages have been found:

  • PowerShell
  • GLIB2
  • GTHREAD2
  • LEX
  • YACC

-- The following OPTIONAL packages have not been found:

  • CAP
  • Gettext
  • LIBSSH (required version >= 0.6) , libssh is library for ssh connections and it is needed to build sshdump , <www: <a="" href="https://www.libssh.org/get-it/&gt;">https://www.libssh.org/get-it/>
  • M
  • PkgConfig
  • SBC , SBC Codec for Bluetooth A2DP stream playing , <www: <a="" href="http://git.kernel.org/cgit/bluetooth/sbc.git&gt;">http://git.kernel.org/cgit/bluetooth/sbc.git>
  • SETCAP
  • YAPP
  • HTMLHelp

-- Configuring done -- Generating done -- Build files have been written to: C:/Users/hshoham/Downloads/wsbuild32

(09 Jan '16, 08:24) Hadar

You are using Qt compiled with mingw, which does not support produce libraries compatible with /SAFESEH flag.

Instead of this version, please install a Qt version compiled with MSVC2013 (you can find it in Qt download area).

permanent link

answered 09 Jan '16, 12:17

Pascal%20Quantin's gravatar image

Pascal Quantin
5.5k960
accept rate: 30%

working fine, Tnx

(09 Jan '16, 15:05) Hadar
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×28

question asked: 09 Jan '16, 05:04

question was seen: 1,694 times

last updated: 10 Jan '16, 02:18

p​o​w​e​r​e​d by O​S​Q​A