From c0c4a4e208aea211ffe0802d3e67f0d44018aa2b Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sun, 2 Jan 2022 10:21:35 +0100 Subject: [PATCH] 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. --- lib/cgraph/cghdr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.40.0