2015-09-04 98 views
0

試圖鏈接的應用程序,讓大量的錯誤,如LINK:警告LNK4098,LNK4217錯誤 - 爲什麼?

1>LINK : warning LNK4098: defaultlib 'mfc140d.lib' conflicts with use of other libs; use /NODEFAULTLIB:library 
1>LINK : warning LNK4098: defaultlib 'mfcs140d.lib' conflicts with use of other libs; use /NODEFAULTLIB:library 
1>LINK : warning LNK4098: defaultlib 'msvcrtd.lib' conflicts with use of other libs; use /NODEFAULTLIB:library 
1>Move.obj : warning LNK4217: locally defined symbol islower imported in function "struct Token __cdecl NextToken(char * const,int &)" ([email protected]@[email protected]@[email protected]) 
1>Move.obj : warning LNK4217: locally defined symbol isdigit imported in function "struct Token __cdecl NextToken(char * const,int &)" ([email protected]@[email protected]@[email protected]) 
1>Position.obj : warning LNK4049: locally defined symbol isdigit imported 

Position.cpp和Move.cpp是我的代碼。這些錯誤的含義是什麼,如何糾正它們?

這是Visual Studio的2015年,該項目從Visual Studio 2010中導入的Windows 7專業版64

回答

1

使用/ VERBOSE:LIB的鏈接器,以指示at this msdn page嘗試開關了解到底是怎麼回事。

我有同樣的那種與mfc140d.libmfcs140d.lib抱怨和問題是,在我的項目,我必須在Unicode和MCBS遵守圖書館的混合。基本上是/ VERBOSE:LIB還列出了符合unicode命名爲mfc140ud.libmfcs140ud.lib我只切換到MCBS字符集並且問題消失。

0

原來,我已經包含來自庫的nafxcwd.lib和libcmtd.lib的鏈接器輸入,來自VS的一些先前版本。圖書館衝突時,VS2015增加了警告。從鏈接器輸入列表中刪除nafxcwd.lib和libcmtd.lib可解決問題,並且項目現在鏈接無錯誤。