]> granicus.if.org Git - graphviz/commitdiff
cgraph: MSBuild: define GVDLL to ensure correct storage-class attributes
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sat, 1 Jan 2022 17:01:01 +0000 (18:01 +0100)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 5 Jan 2022 06:30:23 +0000 (07:30 +0100)
An upcoming commit will change the storage-class attributes to be
controlled by the GVDLL symbol in cdt.h.

Without this change, errors like this would occur:

refstr.obj : error LNK2001: unresolved external symbol _Dttree [C:\GitLab-Runner\builds\magjac\graphviz\lib\cgraph\cgraph.vcxproj]

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

lib/cgraph/cgraph.vcxproj

index 19daa1257ec9549ce5a714b598f079a7adb0f38b..052a3bba77d554021c945075fa10031ab97ca4ef 100644 (file)
@@ -52,7 +52,7 @@
     <ClCompile>
       <Optimization>Disabled</Optimization>
       <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)lib;$(SolutionDir)lib\cdt</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>EXPORT_CGRAPH;EXPORT_AGXBUF;EXPORT_CGHDR;YY_NO_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>GVDLL;EXPORT_CGRAPH;EXPORT_AGXBUF;EXPORT_CGHDR;YY_NO_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <PrecompiledHeader />
@@ -76,7 +76,7 @@ win_flex -oscan.c scan.l</Command>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
       <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)lib;$(SolutionDir)lib\cdt</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>EXPORT_CGRAPH;EXPORT_AGXBUF;EXPORT_CGHDR;YY_NO_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>GVDLL;EXPORT_CGRAPH;EXPORT_AGXBUF;EXPORT_CGHDR;YY_NO_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PrecompiledHeader />
       <WarningLevel>Level4</WarningLevel>
       <EnablePREfast>true</EnablePREfast>