Q_DECL_IMPORT was being triggered when QZeroConf was build statically into another project

This commit is contained in:
Jonathan Bagg
2017-03-14 13:21:34 -04:00
parent 7e94a5f75a
commit 9a6235509c
3 changed files with 6 additions and 1 deletions

View File

@ -21,6 +21,10 @@ QZeroConf can be built directly into your project if your project is [LGPL3](htt
include(qtzeroconf/qtzeroconf.pri) include(qtzeroconf/qtzeroconf.pri)
4. Add QZEROCONF_STATIC define in your projects .pro file
DEFINES= QZEROCONF_STATIC
#### Compiling as a dynamic library #### Compiling as a dynamic library
1. Clone or download QZeroConf. If you download, unzip. 1. Clone or download QZeroConf. If you download, unzip.

View File

@ -2,5 +2,6 @@ QT+= core gui widgets network
TARGET = test_app TARGET = test_app
HEADERS= window.h HEADERS= window.h
SOURCES= main.cpp window.cpp SOURCES= main.cpp window.cpp
DEFINES= QZEROCONF_STATIC
include(../qtzeroconf.pri) include(../qtzeroconf.pri)

View File

@ -32,7 +32,7 @@
#include <QMap> #include <QMap>
#include <QtCore/QtGlobal> #include <QtCore/QtGlobal>
#ifndef QT_STATIC #if (!defined(QT_STATIC) && !defined(QZEROCONF_STATIC))
# ifdef QT_BUILD_ZEROCONF_LIB # ifdef QT_BUILD_ZEROCONF_LIB
# define Q_ZEROCONF_EXPORT Q_DECL_EXPORT # define Q_ZEROCONF_EXPORT Q_DECL_EXPORT
# else # else