From 7859da9ca86eb29a661e613c8da3ba9c7d144d93 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 13 Dec 2015 20:45:50 +0100 Subject: [PATCH] disable new ABI (can't catch ios_base::failure with new ABI) --- CMakeLists.txt | 7 ++++++- general.pri | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3fd4436..e3901bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,7 +83,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) # generate DBus interfaces qt5_add_dbus_interfaces(SRC_FILES ${DBUS_FILES}) -add_definitions(-DCMAKE_BUILD) + +# disable new ABI (can't catch ios_base::failure with new ABI) +add_definitions( + -D_GLIBCXX_USE_CXX11_ABI=0 + -DCMAKE_BUILD +) # executable and linking add_executable(${META_PROJECT_NAME} ${HEADER_FILES} ${SRC_FILES} ${RES_FILES} ${WINDOWS_ICON_PATH}) diff --git a/general.pri b/general.pri index 7072941..f417d7d 100644 --- a/general.pri +++ b/general.pri @@ -7,6 +7,9 @@ RCC_DIR = ./res QMAKE_CXXFLAGS += -std=c++11 QMAKE_LFLAGS += -std=c++11 +# disable new ABI (can't catch ios_base::failure with new ABI) +DEFINES += _GLIBCXX_USE_CXX11_ABI=0 + # variables to check target architecture win32-g++:QMAKE_TARGET.arch = $$QMAKE_HOST.arch win32-g++-32:QMAKE_TARGET.arch = x86