]> granicus.if.org Git - graphviz/commitdiff
label: autotools: define GVC_EXPORTS
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sat, 31 Jul 2021 10:39:00 +0000 (12:39 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 7 Dec 2021 06:35:00 +0000 (07:35 +0100)
Fixes this error using autotools with MinGW:

C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/label/.libs/liblabel_C.a(xlabels.o): in function `xlnew':
C:\Users\magja\graphviz\lib\label/xlabels.c:41: undefined reference to `__imp_zmalloc'

Towards https://gitlab.com/graphviz/graphviz/-/issues/2058

lib/label/Makefile.am

index 8f6e1a41ec1cb5064e2ec310bf6d72b8deb5049c..32eccc94d5bdd428ee343729ff6d65192043743f 100644 (file)
@@ -6,6 +6,10 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/lib/cgraph \
     -I$(top_srcdir)/lib/cdt
 
+if WITH_WIN32
+AM_CFLAGS = -DGVC_EXPORTS=1
+endif
+
 noinst_HEADERS = xlabels.h index.h node.h rectangle.h split.q.h
 noinst_LTLIBRARIES = liblabel_C.la