]> granicus.if.org Git - graphviz/commitdiff
cgraph: move include of config.h to before defining storage-class attributes in cghdr.h
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sun, 2 Jan 2022 09:21:35 +0000 (10:21 +0100)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sun, 9 Jan 2022 08:44:21 +0000 (09:44 +0100)
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

index 4dc9208c05adff8c97e1e4661c7959b838a146ee..a55a63d49a24345f446d568a2ce40ae4b8500c99 100644 (file)
@@ -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 <cgraph.h>
 
 #include               <ctype.h>