]> granicus.if.org Git - graphviz/commitdiff
ortho: CMake: ensure ortho symbols are exported from gvc
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sat, 24 Jul 2021 06:04:53 +0000 (08:04 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 31 Aug 2021 15:45:56 +0000 (17:45 +0200)
The object modules from the static ortho lib are statically linked
into the gvc shared lib which means that its symbols should be
exported from gvc instead of imported. Defining GVC_EXPORTS achieves
this.

Fixes errors like this with MinGW:

C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../ortho/CMakeFiles/ortho_obj.dir/fPQ.c.obj:fPQ.c:(.text+0x6d): undefined reference to `__imp_gcalloc'

lib/ortho/CMakeLists.txt

index 79bca2dabe99ee11fc696b76fd1b4823d0860587..8a538ebc1bd1eb9546522c376422db098cd5cdcf 100644 (file)
@@ -1,6 +1,6 @@
 if (with_ortho)
 
-add_definitions(-D_BLD_gvc=1)
+add_definitions(-D_BLD_gvc=1 -DGVC_EXPORTS)
 
 add_library(ortho_obj OBJECT
     # Header files