Browse Source

Make libwkhtmltopdf.dll compile on windows using a hack

Antialize 15 years ago
parent
commit
bcf243c253

+ 5 - 2
include/wkhtmltox/pdf.h

@@ -1,4 +1,6 @@
-/*
+/* -*- mode: c++; tab-width: 4; indent-tabs-mode: t; eval: (progn (c-set-style "stroustrup") (c-set-offset 'innamespace 0)); -*-
+ * vi:set ts=4 sts=4 sw=4 noet :
+ *
  * Copyright 2010 wkhtmltopdf authors
  * Copyright 2010 wkhtmltopdf authors
  *
  *
  * This file is part of wkhtmltopdf.
  * This file is part of wkhtmltopdf.
@@ -34,9 +36,10 @@ typedef void (*wkhtmltopdf_str_callback)(wkhtmltopdf_converter * converter, cons
 typedef void (*wkhtmltopdf_int_callback)(wkhtmltopdf_converter * converter, const int val);
 typedef void (*wkhtmltopdf_int_callback)(wkhtmltopdf_converter * converter, const int val);
 typedef void (*wkhtmltopdf_void_callback)(wkhtmltopdf_converter * converter);
 typedef void (*wkhtmltopdf_void_callback)(wkhtmltopdf_converter * converter);
 
 
-CAPI int wkhtmltopdf_init(int useGraphics);
+CAPI int wkhtmltopdf_init(int use_graphics);
 CAPI int wkhtmltopdf_deinit();
 CAPI int wkhtmltopdf_deinit();
 CAPI int wkhtmltopdf_extended_qt();
 CAPI int wkhtmltopdf_extended_qt();
+CAPI const char * wkhtmltopdf_version();
 
 
 CAPI wkhtmltopdf_global_settings * wkhtmltopdf_create_global_settings();
 CAPI wkhtmltopdf_global_settings * wkhtmltopdf_create_global_settings();
 CAPI wkhtmltopdf_object_settings * wkhtmltopdf_create_object_settings();
 CAPI wkhtmltopdf_object_settings * wkhtmltopdf_create_object_settings();

+ 5 - 0
src/lib/converter.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 #include "converter_p.hh"
 #include "converter_p.hh"
 #include "multipageloader.hh"
 #include "multipageloader.hh"

+ 7 - 1
src/lib/converter.hh

@@ -17,9 +17,15 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
-
 #ifndef __CONVERTER_HH__
 #ifndef __CONVERTER_HH__
 #define __CONVERTER_HH__
 #define __CONVERTER_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QObject>
 #include <QObject>
 
 
 #include <wkhtmltox/dllbegin.inc>
 #include <wkhtmltox/dllbegin.inc>

+ 6 - 0
src/lib/converter_p.hh

@@ -20,6 +20,12 @@
 
 
 #ifndef __CONVERTER_P_HH__
 #ifndef __CONVERTER_P_HH__
 #define __CONVERTER_P_HH__
 #define __CONVERTER_P_HH__
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include "converter.hh"
 #include "converter.hh"
 #include "websettings.hh"
 #include "websettings.hh"
 #include <QFile>
 #include <QFile>

+ 5 - 0
src/lib/image_c_bindings.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 #include "image_c_bindings_p.hh"
 #include "image_c_bindings_p.hh"
 #include "pdf.h"
 #include "pdf.h"

+ 7 - 0
src/lib/image_c_bindings_p.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __IMAGE_C_BINDINGS_P_HH__
 #ifndef __IMAGE_C_BINDINGS_P_HH__
 #define __IMAGE_C_BINDINGS_P_HH__
 #define __IMAGE_C_BINDINGS_P_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include "image.h"
 #include "image.h"
 #include "imageconverter.hh"
 #include "imageconverter.hh"
 #include <QObject>
 #include <QObject>

+ 5 - 0
src/lib/imageconverter.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 #include "imageconverter_p.hh"
 #include "imageconverter_p.hh"
 #include "imagesettings.hh"
 #include "imagesettings.hh"

+ 7 - 0
src/lib/imageconverter.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __IMAGECONVERTER_HH__
 #ifndef __IMAGECONVERTER_HH__
 #define __IMAGECONVERTER_HH__
 #define __IMAGECONVERTER_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <wkhtmltox/converter.hh>
 #include <wkhtmltox/converter.hh>
 #include <wkhtmltox/imagesettings.hh>
 #include <wkhtmltox/imagesettings.hh>
 
 

+ 7 - 0
src/lib/imageconverter_p.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __IMAGECONVERTER_P_HH__
 #ifndef __IMAGECONVERTER_P_HH__
 #define __IMAGECONVERTER_P_HH__
 #define __IMAGECONVERTER_P_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include "converter_p.hh"
 #include "converter_p.hh"
 #include "imageconverter.hh"
 #include "imageconverter.hh"
 #include "multipageloader.hh"
 #include "multipageloader.hh"

+ 5 - 0
src/lib/imagesettings.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 #include "imagesettings.hh"
 #include "imagesettings.hh"
 #include "reflect.hh"
 #include "reflect.hh"

+ 7 - 0
src/lib/imagesettings.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __IMAGESETTINGS_HH__
 #ifndef __IMAGESETTINGS_HH__
 #define __IMAGESETTINGS_HH__
 #define __IMAGESETTINGS_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QString>
 #include <QString>
 #include <wkhtmltox/loadsettings.hh>
 #include <wkhtmltox/loadsettings.hh>
 #include <wkhtmltox/websettings.hh>
 #include <wkhtmltox/websettings.hh>

+ 2 - 0
src/lib/lib.pro

@@ -22,6 +22,8 @@ include(../../version.pri)
 include(../../common.pri)
 include(../../common.pri)
 include(lib.pri)
 include(lib.pri)
 
 
+DEFINES += __WKHTMLTOX_UNDEF_QT_DLL__
+
 unix {
 unix {
    headers.targit=headers
    headers.targit=headers
    headers.files=../../include/wkhtmltox/*
    headers.files=../../include/wkhtmltox/*

+ 5 - 0
src/lib/loadsettings.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 #include "loadsettings.hh"
 #include "loadsettings.hh"
 #include <QMap>
 #include <QMap>

+ 7 - 0
src/lib/loadsettings.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __LOADSETTINGS_HH__
 #ifndef __LOADSETTINGS_HH__
 #define __LOADSETTINGS_HH__
 #define __LOADSETTINGS_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QNetworkProxy>
 #include <QNetworkProxy>
 #include <QString>
 #include <QString>
 
 

+ 5 - 0
src/lib/multipageloader.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 #include "multipageloader_p.hh"
 #include "multipageloader_p.hh"
 #include <QFile>
 #include <QFile>

+ 7 - 0
src/lib/multipageloader.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __MULTIPAGELOADER_HH__
 #ifndef __MULTIPAGELOADER_HH__
 #define __MULTIPAGELOADER_HH__
 #define __MULTIPAGELOADER_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QFile>
 #include <QFile>
 #include <QObject>
 #include <QObject>
 #include <QUrl>
 #include <QUrl>

+ 7 - 0
src/lib/multipageloader_p.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __MULTIPAGELOADER_P_HH__
 #ifndef __MULTIPAGELOADER_P_HH__
 #define __MULTIPAGELOADER_P_HH__
 #define __MULTIPAGELOADER_P_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include "multipageloader.hh"
 #include "multipageloader.hh"
 #include "tempfile.hh"
 #include "tempfile.hh"
 #include <QAtomicInt>
 #include <QAtomicInt>

+ 5 - 0
src/lib/outline.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 #include "outline_p.hh"
 #include "outline_p.hh"
 #include <fstream>
 #include <fstream>

+ 7 - 0
src/lib/outline.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __OUTLINE_HH__
 #ifndef __OUTLINE_HH__
 #define __OUTLINE_HH__
 #define __OUTLINE_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include "pdfsettings.hh"
 #include "pdfsettings.hh"
 #include <QWebElement>
 #include <QWebElement>
 #include <QWebFrame>
 #include <QWebFrame>

+ 7 - 0
src/lib/outline_p.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __OUTLINE_P_HH__
 #ifndef __OUTLINE_P_HH__
 #define __OUTLINE_P_HH__
 #define __OUTLINE_P_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include "outline.hh"
 #include "outline.hh"
 #ifdef __EXTENSIVE_WKHTMLTOPDF_QT_HACK__
 #ifdef __EXTENSIVE_WKHTMLTOPDF_QT_HACK__
 #include "dllbegin.inc"
 #include "dllbegin.inc"

+ 1 - 0
src/lib/pdf.h

@@ -39,6 +39,7 @@ typedef void (*wkhtmltopdf_void_callback)(wkhtmltopdf_converter * converter);
 CAPI int wkhtmltopdf_init(int use_graphics);
 CAPI int wkhtmltopdf_init(int use_graphics);
 CAPI int wkhtmltopdf_deinit();
 CAPI int wkhtmltopdf_deinit();
 CAPI int wkhtmltopdf_extended_qt();
 CAPI int wkhtmltopdf_extended_qt();
+CAPI const char * wkhtmltopdf_version();
 
 
 CAPI wkhtmltopdf_global_settings * wkhtmltopdf_create_global_settings();
 CAPI wkhtmltopdf_global_settings * wkhtmltopdf_create_global_settings();
 CAPI wkhtmltopdf_object_settings * wkhtmltopdf_create_object_settings();
 CAPI wkhtmltopdf_object_settings * wkhtmltopdf_create_object_settings();

+ 11 - 2
src/lib/pdf_c_bindings.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 /**
 /**
  * \file pdf.h
  * \file pdf.h
@@ -84,6 +89,11 @@ CAPI int wkhtmltopdf_extended_qt() {
 #endif
 #endif
 }
 }
 
 
+
+CAPI const char * wkhtmltopdf_version() {
+	return "NOT IMPLEMENTED";
+}
+
 /**
 /**
  * \brief Setup wkhtmltopdf
  * \brief Setup wkhtmltopdf
  *
  *
@@ -230,8 +240,7 @@ CAPI void wkhtmltopdf_cancel(wkhtmltopdf_converter * converter) {
 	reinterpret_cast<MyPdfConverter *>(converter)->converter.cancel();
 	reinterpret_cast<MyPdfConverter *>(converter)->converter.cancel();
 }
 }
 
 
-CAPI void wkhtmltopdf_add_resource(
-	wkhtmltopdf_converter * converter, wkhtmltopdf_object_settings * settings, const char * data) {
+CAPI void wkhtmltopdf_add_resource(wkhtmltopdf_converter * converter, wkhtmltopdf_object_settings * settings, const char * data) {
 	reinterpret_cast<MyPdfConverter *>(converter)->converter.addResource(
 	reinterpret_cast<MyPdfConverter *>(converter)->converter.addResource(
 		*reinterpret_cast<settings::PdfObject *>(settings) );
 		*reinterpret_cast<settings::PdfObject *>(settings) );
 	reinterpret_cast<MyPdfConverter *>(converter)->objectSettings.push_back(reinterpret_cast<settings::PdfObject *>(settings));
 	reinterpret_cast<MyPdfConverter *>(converter)->objectSettings.push_back(reinterpret_cast<settings::PdfObject *>(settings));

+ 7 - 0
src/lib/pdf_c_bindings_p.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __PDF_C_BINDINGS_P_HH__
 #ifndef __PDF_C_BINDINGS_P_HH__
 #define __PDF_C_BINDINGS_P_HH__
 #define __PDF_C_BINDINGS_P_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include "pdf.h"
 #include "pdf.h"
 #include "pdfconverter.hh"
 #include "pdfconverter.hh"
 #include <QObject>
 #include <QObject>

+ 5 - 0
src/lib/pdfconverter.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 #include "pdfconverter_p.hh"
 #include "pdfconverter_p.hh"
 #include <QAuthenticator>
 #include <QAuthenticator>

+ 7 - 0
src/lib/pdfconverter.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __PDFCONVERTER_HH__
 #ifndef __PDFCONVERTER_HH__
 #define __PDFCONVERTER_HH__
 #define __PDFCONVERTER_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <wkhtmltox/converter.hh>
 #include <wkhtmltox/converter.hh>
 #include <wkhtmltox/pdfsettings.hh>
 #include <wkhtmltox/pdfsettings.hh>
 
 

+ 7 - 0
src/lib/pdfconverter_p.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __PDFCONVERTER_P_HH__
 #ifndef __PDFCONVERTER_P_HH__
 #define __PDFCONVERTER_P_HH__
 #define __PDFCONVERTER_P_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include "converter_p.hh"
 #include "converter_p.hh"
 #include "multipageloader.hh"
 #include "multipageloader.hh"
 #include "outline.hh"
 #include "outline.hh"

+ 5 - 0
src/lib/pdfsettings.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 #include "pdfsettings.hh"
 #include "pdfsettings.hh"
 #include "reflect.hh"
 #include "reflect.hh"

+ 7 - 0
src/lib/pdfsettings.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __PDFSETTINGS_HH__
 #ifndef __PDFSETTINGS_HH__
 #define __PDFSETTINGS_HH__
 #define __PDFSETTINGS_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QNetworkProxy>
 #include <QNetworkProxy>
 #include <QPrinter>
 #include <QPrinter>
 #include <QString>
 #include <QString>

+ 5 - 0
src/lib/reflect.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 #include "reflect.hh"
 #include "reflect.hh"
 
 

+ 7 - 0
src/lib/reflect.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __REFLECT_HH__
 #ifndef __REFLECT_HH__
 #define __REFLECT_HH__
 #define __REFLECT_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include "loadsettings.hh"
 #include "loadsettings.hh"
 #include "websettings.hh"
 #include "websettings.hh"
 #include <QStringList>
 #include <QStringList>

+ 5 - 0
src/lib/tempfile.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 #include "tempfile.hh"
 #include "tempfile.hh"
 #include <QDir>
 #include <QDir>

+ 7 - 0
src/lib/tempfile.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __TEMPFILE_HH__
 #ifndef __TEMPFILE_HH__
 #define __TEMPFILE_HH__
 #define __TEMPFILE_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QString>
 #include <QString>
 
 
 #include "dllbegin.inc"
 #include "dllbegin.inc"

+ 5 - 0
src/lib/tocstylesheet.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 #include "outline_p.hh"
 #include "outline_p.hh"
 #include "pdfsettings.hh"
 #include "pdfsettings.hh"

+ 5 - 0
src/lib/utilities.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 #include "utilities.hh"
 #include "utilities.hh"
 
 

+ 7 - 0
src/lib/utilities.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __UTILITIES_HH__
 #ifndef __UTILITIES_HH__
 #define __UTILITIES_HH__
 #define __UTILITIES_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QCleanlooksStyle>
 #include <QCleanlooksStyle>
 #include <QCommonStyle>
 #include <QCommonStyle>
 #include <QFile>
 #include <QFile>

+ 5 - 0
src/lib/websettings.cc

@@ -17,6 +17,11 @@
 //
 //
 // You should have received a copy of the GNU General Public License
 // You should have received a copy of the GNU General Public License
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
 // along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
 
 
 #include "websettings.hh"
 #include "websettings.hh"
 namespace wkhtmltopdf {
 namespace wkhtmltopdf {

+ 7 - 0
src/lib/websettings.hh

@@ -20,6 +20,13 @@
 
 
 #ifndef __WEBSETTINGS_HH__
 #ifndef __WEBSETTINGS_HH__
 #define __WEBSETTINGS_HH__
 #define __WEBSETTINGS_HH__
+
+#ifdef __WKHTMLTOX_UNDEF_QT_DLL__
+#ifdef QT_DLL
+#undef QT_DLL
+#endif
+#endif
+
 #include <QNetworkProxy>
 #include <QNetworkProxy>
 #include <QString>
 #include <QString>