I also had this problem. When converting a working VS2008 project to VS2010, the communication phase is broken in the VS2010 project with the same error. He is trying to link .lib that the project should be built!
I found the source of my problem: the project has a custom build step, which happens at the end of the build, before PostBuildEvent. This custom build step copies the .dll, .lib, and .pdb files from $ (OutDir) to an external location.
In the Outputs list for the custom build stage, the full path to the copied .dll, .lib and .pdb is set, for example:
C:/a_new_location/myproject.dll; C:/a_new_location/myproject.lib; C:/a_new_location/myproject.pdb.
I found that whenever this list of results includes .lib, this .lib is added to the list of files for the link in the link phase. Thus, with the above list of outputs, the communication phase will have a list of files:
myprojectfile1.obj myprojectfile2.obj C:/a_new_location/myproject.lib
And this causes the link to fail:
LINK : fatal error LNK1181: cannot open input file 'C:\a_new_location\G4SrcCfgLib.lib'
It does not matter if the user build copies a copy of the file or not. All that matters is that there is a .lib in the list of results. So, I solved the problem, of course, removing .lib from the Outputs list. The disadvantage of this is that running the Clean assembly will not clear C: / a_new_location / lib. But at least he is building.
source share