mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
libdivecomputer.h: fix warning with DC_VERSION on Win32
"warning: "DC_VERSION" redefined" is thrown if a chain of
includes previously includes windows.h:
In file included from c:/bin/mingw/i686-w64-mingw32/include/windows.h:71:0,
from C:/bin/qt/5.5/mingw492_32/include/QtCore/qt_windows.h:63,
from C:/bin/qt/5.5/mingw492_32/include/QtGui/qopengl.h:43,
from C:/bin/qt/5.5/mingw492_32/include/QtQuick/qquickwindow.h:39,
from C:/bin/qt/5.5/mingw492_32/include/QtQuick/QQuickWindow:1,
from C:/dev/subsurface/subsurface-core/qt-gui.h:13,
from C:\dev\subsurface\subsurface-mobile-main.cpp:9:
and which on it's own includes wingdi.h which defines
"DC_VERSION 10" (windows printer stack related).
To solve the warning DC_VERSION is undefined in
subsurface-core/libdivecomputer.h.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5756ce281f
commit
694fc9d00f
1 changed files with 4 additions and 0 deletions
|
|
@ -3,6 +3,10 @@
|
|||
|
||||
|
||||
/* libdivecomputer */
|
||||
|
||||
#ifdef DC_VERSION /* prevent a warning with wingdi.h */
|
||||
#undef DC_VERSION
|
||||
#endif
|
||||
#include <libdivecomputer/version.h>
|
||||
#include <libdivecomputer/device.h>
|
||||
#include <libdivecomputer/parser.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue