Problem:
CLR project使用了两个第三方的library文件,在这两个library文件中出现了重复定义,错误信息如下:
error LNK2005: "public: operator ss already defined in YYYY.lib(CCCC.obj) File: XXXX.lib(BBBB.dll)
symbol already defined in object
The given symbol, displayed in its decorated form, was multiply defined.
Solution:
To fix, add /FORCE:MULTIPLE to the linker command line options, and make sure that YYYY.lib is the first library referenced.
添加了 /FORCE:MULTIPLE之后, 以上链接错误信息不再出现,出现下面了warning:
warning LNK4006: "public: operator ss already defined in YYYY.lib(CCCC.obj); second definition ignored File: XXXX.lib(BBBB.dll)
更多相关信息,请查看MSDN: http://msdn.microsoft.com/en-us/library/72zdcz6f%28VS.71%29.aspx