From a2656670f7a6cad5d1bed420299c06036534209e Mon Sep 17 00:00:00 2001 From: Nick Tiskov Date: Fri, 25 Jan 2013 22:52:12 +0400 Subject: [PATCH] Fixes: 1) Building fails w/o "CONFIG += strace_win" 2) mingw build Commenting Mingw release flags section for now. Strace is not reliable with mingw (only calls to other libraries are resolved, internal calls show up as addresses). --- src/main.cpp | 4 ++++ src/src.pro | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 96bac9b8e..ad35ae107 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -152,9 +152,11 @@ void sigsegvHandler(int) { std::cerr << "qBittorrent version: " << VERSION << std::endl; print_stacktrace(); #else +#ifdef STACKTRACE_WIN StraceDlg dlg; dlg.setStacktraceString(straceWin::getBacktrace()); dlg.exec(); +#endif #endif raise(SIGSEGV); } @@ -167,9 +169,11 @@ void sigabrtHandler(int) { std::cerr << "qBittorrent version: " << VERSION << std::endl; print_stacktrace(); #else +#ifdef STACKTRACE_WIN StraceDlg dlg; dlg.setStacktraceString(straceWin::getBacktrace()); dlg.exec(); +#endif #endif raise(SIGABRT); } diff --git a/src/src.pro b/src/src.pro index ab117c295..10f6e4bf1 100644 --- a/src/src.pro +++ b/src/src.pro @@ -252,7 +252,10 @@ strace_win:win32:{ # Generate debug info in release builds release:{ - win32-g++:QMAKE_CXXFLAGS_RELEASE += -g + #win32-g++:{ + # QMAKE_CXXFLAGS_RELEASE += -g + # QMAKE_LFLAGS_RELEASE -= -Wl,-s + #} win32-msvc*:{ QMAKE_CXXFLAGS_RELEASE += -Zi QMAKE_LFLAGS += "/DEBUG" @@ -260,7 +263,8 @@ strace_win:win32:{ } DEFINES += STACKTRACE_WIN - LIBS += dbghelp.lib + win32-msvc*:LIBS += dbghelp.lib + win32-g++:LIBS += libdbghelp FORMS += stacktrace_win_dlg.ui HEADERS += stacktrace_win.h \