[wix-users] error LGHT0091: Duplicate symbol

Ian Bell ib at ianbellsoftware.com
Sun Apr 24 21:50:23 PDT 2016


I have not been able to resolve a "error LGHT0091: Duplicate symbol" error
message that has been plaguing me for 2 days and I am hoping to find some
help here.

 

The attached ZIP file contains a small Visual Studio 2010 solution which can
be used to replicate the problem.   The sample VS2010 solution includes two
C++ projects and a WIX installer.    The two C++ projects contain
identically named source files (e.g. main.cpp, main.h, stdafx.cpp,
stdafx.h).   Attempting to build a WIX project with non-unique source code
filenames (i.e. their filepaths differ but the filenames are the same)
generates error messages similar to 'error LGHT0091: Duplicate symbol
found'.   The complete error message generated for the sample solution is
included at the end of this email message.   Google lists only handful of
posts which cite the LGHT0091 and LGHT0092 error numbers and these refer to
GUI related problems - something my WIX installer avoids.

 

One solution is to provide unique source code filenames between projects -
but this is a very impractical, particularly for files with common Visual
Studio generated filenames names such as 'stdafx.cpp', 'stdafx.h',
'resource.h', etc.   

 

So my question is has anyone encountered the problem before and found a
solution?   I would appreciate any suggestions you might have.

 

ThanX

 

Ian

 

 

 

 

 

 

 

 

 

1>------ Build started: Project: WixInstaller, Configuration: Debug x86
------

1>            C:\Program Files (x86)\WiX Toolset v3.10\bin\candle.exe
-dDebug -d"DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE\\" -d"SolutionDir=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\\" -dSolutionExt=.sln
-dSolutionFileName=testWixError.sln -dSolutionName=testWixError
-d"SolutionPath=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\testWixError.sln" -dConfiguration=Debug
-dOutDir=bin\Debug\ -dPlatform=x86
-d"ProjectDir=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\\" -dProjectExt=.wixproj
-dProjectFileName=WixInstaller.wixproj -dProjectName=WixInstaller
-d"ProjectPath=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\WixInstaller.wixproj"
-d"TargetDir=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\bin\Debug\\" -dTargetExt=.msi
-dTargetFileName=WixInstaller.msi -dTargetName=WixInstaller
-d"TargetPath=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\bin\Debug\WixInstaller.msi"
-dProjA.Configuration=Debug -d"ProjA.FullConfiguration=Debug|Win32"
-dProjA.Platform=Win32 -d"ProjA.ProjectDir=e:\Users\admin\Documents\Visual
Studio 2010\Projects\testWixError\ProjA\\" -dProjA.ProjectExt=.vcxproj
-dProjA.ProjectFileName=ProjA.vcxproj -dProjA.ProjectName=ProjA
-d"ProjA.ProjectPath=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\ProjA\ProjA.vcxproj"
-d"ProjA.TargetDir=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\Debug\\" -dProjA.TargetExt=.exe
-dProjA.TargetFileName=ProjA.exe -dProjA.TargetName=ProjA
-d"ProjA.TargetPath=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\Debug\ProjA.exe" -dProjB.Configuration=Debug
-d"ProjB.FullConfiguration=Debug|Win32" -dProjB.Platform=Win32
-d"ProjB.ProjectDir=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\ProjB\\" -dProjB.ProjectExt=.vcxproj
-dProjB.ProjectFileName=ProjB.vcxproj -dProjB.ProjectName=ProjB
-d"ProjB.ProjectPath=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\ProjB\ProjB.vcxproj"
-d"ProjB.TargetDir=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\Debug\\" -dProjB.TargetExt=.exe
-dProjB.TargetFileName=ProjB.exe -dProjB.TargetName=ProjB
-d"ProjB.TargetPath=e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\Debug\ProjB.exe" -out obj\Debug\ -arch x86
Product.wxs

1>            C:\Program Files (x86)\WiX Toolset v3.10\bin\Light.exe -out
"e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\bin\Debug\WixInstaller.msi" -pdbout
"e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\bin\Debug\WixInstaller.wixpdb"
-cultures:null -contentsfile
obj\Debug\WixInstaller.wixproj.BindContentsFileListnull.txt -outputsfile
obj\Debug\WixInstaller.wixproj.BindOutputsFileListnull.txt -builtoutputsfile
obj\Debug\WixInstaller.wixproj.BindBuiltOutputsFileListnull.txt
-wixprojectfile "e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\WixInstaller.wixproj"
obj\Debug\Product.wixobj

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(41,0): error LGHT0091:
Duplicate symbol 'File:main.cpp' found. This typically means that an Id is
duplicated. Check to make sure all your identifiers of a given type (File,
Component, Feature) are unique.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(67,0): error LGHT0092:
Location of symbol related to previous error.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(45,0): error LGHT0091:
Duplicate symbol 'File:main.h' found. This typically means that an Id is
duplicated. Check to make sure all your identifiers of a given type (File,
Component, Feature) are unique.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(71,0): error LGHT0092:
Location of symbol related to previous error.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(49,0): error LGHT0091:
Duplicate symbol 'File:Resource.h' found. This typically means that an Id is
duplicated. Check to make sure all your identifiers of a given type (File,
Component, Feature) are unique.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(75,0): error LGHT0092:
Location of symbol related to previous error.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(53,0): error LGHT0091:
Duplicate symbol 'File:stdafx.cpp' found. This typically means that an Id is
duplicated. Check to make sure all your identifiers of a given type (File,
Component, Feature) are unique.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(79,0): error LGHT0092:
Location of symbol related to previous error.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(57,0): error LGHT0091:
Duplicate symbol 'File:stdafx.h' found. This typically means that an Id is
duplicated. Check to make sure all your identifiers of a given type (File,
Component, Feature) are unique.

1>e:\Users\admin\Documents\Visual Studio
2010\Projects\testWixError\WixInstaller\Product.wxs(83,0): error LGHT0092:
Location of symbol related to previous error.

1>Done building project "WixInstaller.wixproj" -- FAILED.

1>

========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

 

 



More information about the wix-users mailing list