Reputation: 4633
I have a problem with the linker of standard Windows libraries in Visual Studio 2013. I receive the following message when I try to build C++ project:
This error message when I build it with platform toolset v100:
error LNK1123: failure during conversion to COFF: file invalid or corrupt C:\Solutions\PatchManagement\Trunk\Main\Windows\PatchMgmtAgentsTest\LINK PatchMgmtAgentsTest
This error message when I build it with platform toolset v120:
error LNK1104: cannot open file 'atlsd.lib' C:\Solutions\PatchManagement\Trunk\Main\Windows\PatchMgmtAgentsTest\LINK PatchMgmtAgentsTest
Earlier this C++ project and others C# projects in the same solution were written on VS2008 using .NET 3.5. Now it is migrated to VS2013 and to .NET 4.5.1.
Moreover, I have VS2008(where was old version of the same solution to verify migration) and VS2010 for anbother solution. I have found some solutions or tips that the first error message can be appeared due to .NET 4.0 or greater, or due to some Visual studios variable enviroments which leads to conflicts. However, I cannot refuse .NET 4.5.1. How can I fix first or second error message in my case?
Upvotes: 2
Views: 1165
Reputation: 2959
The error cannot open file 'atlsd.lib' is probably occurring because VS2013 no longer provides atlsd.lib, but you are linking to a library that was built with an older version of the toolset (e.g. VS2012) that is pulling in atlsd.lib.
Solution:
The tricky part is to find out which library is pulling in atlsd.lib. I answered that question by running grep
from my msysgit install like:
grep atlsd *.lib
Then rebuild that library with VS2013.
Upvotes: 1