]> granicus.if.org Git - graphviz/commit
ortho: use GVDLL instead of _WIN32 to enable storage-class attributes
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sun, 22 Aug 2021 08:45:11 +0000 (10:45 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 28 Sep 2021 16:17:16 +0000 (18:17 +0200)
commit132f98c70cc987604027627594289d4458f90e2e
tree2c2849e28a0beefaaa02ce741c1310aa19937ecb
parentef64016c93276acbfc17ee9fb59a42822463cf1a
ortho: use GVDLL instead of _WIN32 to enable storage-class attributes

The immediate reason for this change is to enable Windows-specific
storage-class attributes for autotools builds with Cygwin. The _WIN32
symbol is not defined when using Cygwin.

Since https://gitlab.com/graphviz/graphviz/-/merge_requests/2182,
setting GVDLL is the preferred single mechanism to enable those
attributes, rather than using _WIN32 and __CYGWIN__ plus some other
symbol to distinguish between static and dynamic-link/shared
libraries.

This is the first step of two in fixing these errors in autotools
builds with Cygwin:

/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ../../lib/dotgen/.libs/libdotgen_C.a(dotsplines.o): in function `_dot_splines':
/home/magja/graphviz/lib/dotgen/dotsplines.c:334: undefined reference to `orthoEdges'
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: /home/magja/graphviz/lib/dotgen/dotsplines.c:337: undefined reference to `orthoEdges'

The Windows-specific storage-class attributes are however still not
correct for Cygwin autotools builds, since GVC_EXPORT is currently not
set in the autotools builds. The error is now instead:

/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ../../lib/dotgen/.libs/libdotgen_C.a(dotsplines.o): in function `_dot_splines':
/home/magja/graphviz/lib/dotgen/dotsplines.c:334: undefined reference to `__imp_orthoEdges'
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: /home/magja/graphviz/lib/dotgen/dotsplines.c:337: undefined reference to `__imp_orthoEdges'

The next commit in this series will fix this.

Also towards
https://gitlab.com/graphviz/graphviz/-/issues/2058#note_678679545
lib/ortho/ortho.h