]> granicus.if.org Git - graphviz/commit
remove import/export declaration of lt_preloaded_sybols in gvcext.h
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 21 Jul 2021 10:04:18 +0000 (12:04 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 31 Aug 2021 15:47:02 +0000 (17:47 +0200)
commit1cb3d69b07850cb555a8c00f449b264757f44d45
treec2fb7e5505984fe3491405e931cbbdd206a96363
parent5121c3a77901eb1a23636fbe3b32f1e8eb2ed396
remove import/export declaration of lt_preloaded_sybols in gvcext.h

lt_preloaded_symbols is always defined in the executable that links to
the gvc lib, so it should only have a standard extern declaration.

Fixes this error with MinGW:

C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cmd/dot/CMakeFiles/dot.dir/dot.c.obj:dot.c:(.text+0x1e9): undefined reference to `__imp_lt_preloaded_symbols'

Also removes this warning with MinGw:

C:/Users/magja/graphviz/cmd/dot/no_builtins.c:13:14: warning: 'lt_preloaded_symbols' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
   13 | lt_symlist_t lt_preloaded_symbols[] = { { 0, 0 } };
      |              ^~~~~~~~~~~~~~~~~~~~

Also removes these three warnings in standard Windows MSVC builds:

C:\Users\magja\graphviz\cmd\dot\no_builtins.c(13,37): warning C4273: 'lt_preloaded_symbols': inconsistent dll linkage [C:\Users\magja\graphviz\build\cmd\dot\dot.vcxproj]
C:\Users\magja\graphviz\cmd\tools\gvpack.c(34,37): warning C4273: 'lt_preloaded_symbols': inconsistent dll linkage [C:\Users\magja\graphviz\build\cmd\tools\gvpack.vcxproj]
LINK : warning LNK4217: symbol 'lt_preloaded_symbols' defined in 'no_builtins.obj' is imported by 'dot.obj' in function 'main' [C:\Users\magja\graphviz\build\cmd\dot\dot.vcxproj]
lib/gvc/gvcext.h