From 87389f010bf026debf4cabff415c7512b49670cb Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Sat, 4 Dec 2021 08:36:54 +0000 Subject: [PATCH] build: fix broken builds when FSD source changes Turns out that the linker automatically creates .LIB and .EXP files for all targets that export symbols (e.g. via __declspec(dllexport)). The FSD now exports symbols for use by other kernel drivers; this resulted in files like winfsp-x64.lib and winfsp-x64.exp to be inadvertently created. Unfortunately this clashed with the files with the same name created from building the DLL. Since we only want the .LIB and .EXP files produced from the DLL, we rename the .LIB and .EXP files produced from the FSD to a name that does not clash. There does not seem to be any way to instruct the linker to completely turn off .LIB and .EXP file generation for targets that export symbols. --- build/VStudio/winfsp_sys.vcxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/VStudio/winfsp_sys.vcxproj b/build/VStudio/winfsp_sys.vcxproj index e4edca83..c681fbe4 100644 --- a/build/VStudio/winfsp_sys.vcxproj +++ b/build/VStudio/winfsp_sys.vcxproj @@ -110,6 +110,7 @@ $(OutDir)$(TargetFileName).pdb $(OutDir)$(TargetFileName).map $(OutDir)$(TargetFileName).public.pdb + $(OutDir)$(TargetName)$(TargetExt).lib @@ -124,6 +125,7 @@ $(OutDir)$(TargetFileName).map $(OutDir)$(TargetFileName).public.pdb /PDBALTPATH:$(TargetFileName).pdb %(AdditionalOptions) + $(OutDir)$(TargetName)$(TargetExt).lib @@ -137,6 +139,7 @@ $(OutDir)$(TargetFileName).pdb $(OutDir)$(TargetFileName).map $(OutDir)$(TargetFileName).public.pdb + $(OutDir)$(TargetName)$(TargetExt).lib @@ -151,6 +154,7 @@ $(OutDir)$(TargetFileName).map $(OutDir)$(TargetFileName).public.pdb /PDBALTPATH:$(TargetFileName).pdb %(AdditionalOptions) + $(OutDir)$(TargetName)$(TargetExt).lib