From: Magnus Jacobsson Date: Sun, 2 Jan 2022 09:21:35 +0000 (+0100) Subject: cgraph: move include of config.h to before defining storage-class attributes in cghdr.h X-Git-Tag: 3.0.0~87^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c0c4a4e208aea211ffe0802d3e67f0d44018aa2b;p=graphviz cgraph: move include of config.h to before defining storage-class attributes in cghdr.h The GVDLL symbol is defined in config.h for autotools builds and an upcoming commit which changes cghdr.h to use GVDLL to control the storage-class attribute declarations would otherwise cause errors like this: C:\Users\magja\graphviz\cmd\tools/gc.c:333: undefined reference to `__imp_agapply' Towards https://gitlab.com/graphviz/graphviz/-/issues/2173. --- diff --git a/lib/cgraph/cghdr.h b/lib/cgraph/cghdr.h index 4dc9208c0..a55a63d49 100644 --- a/lib/cgraph/cghdr.h +++ b/lib/cgraph/cghdr.h @@ -10,6 +10,8 @@ #pragma once +#include "config.h" + #define _BLD_cgraph 1 #ifdef _WIN32 @@ -22,8 +24,6 @@ # define CGHDR_API extern #endif -#include "config.h" - #include #include