From 78ca25a5fbd9e68a27164582d7643083349846c8 Mon Sep 17 00:00:00 2001 From: luogang Date: Wed, 3 Feb 2021 16:47:13 +0800 Subject: [PATCH] =?UTF-8?q?Fixed=20compilation=20errors=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CPPWebFramework/UnitTests.pro | 1 + CPPWebFramework/cwf/cppwebframework_global.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CPPWebFramework/UnitTests.pro b/CPPWebFramework/UnitTests.pro index ed9c054..5f0c2b7 100644 --- a/CPPWebFramework/UnitTests.pro +++ b/CPPWebFramework/UnitTests.pro @@ -137,6 +137,7 @@ HEADERS += \ tests/tst_cstlcompilerout.h \ cwf/sslloader.h +DEFINES += CPPWEBFRAMEWORK_TEST QMAKE_CXXFLAGS += -g -Wall -fprofile-arcs -ftest-coverage -O0 QMAKE_LFLAGS += -g -Wall -fprofile-arcs -ftest-coverage -O0 LIBS += -lgcov diff --git a/CPPWebFramework/cwf/cppwebframework_global.h b/CPPWebFramework/cwf/cppwebframework_global.h index f6561b3..0e81c5c 100644 --- a/CPPWebFramework/cwf/cppwebframework_global.h +++ b/CPPWebFramework/cwf/cppwebframework_global.h @@ -10,7 +10,9 @@ #include -#if defined(CPPWEBFRAMEWORK_LIBRARY) +#if defined(CPPWEBFRAMEWORK_TEST) +# define CPPWEBFRAMEWORKSHARED_EXPORT +#elif defined(CPPWEBFRAMEWORK_LIBRARY) # define CPPWEBFRAMEWORKSHARED_EXPORT Q_DECL_EXPORT #else # define CPPWEBFRAMEWORKSHARED_EXPORT Q_DECL_IMPORT