Thursday, August 28, 2008

fatal error LNK1181: cannot open input file

Linker Error
--------------
MS_LINK : fatal error LNK1181: cannot open input file '..\..\..\..\..\3gpstack\pd_streaming_lib\prj\lib_ppc2003_evc4\windows mobile 5.0 smartphone sdk (armv4i)\debug\etm_pd_stack_lib_ppc2003_evc4.lib'

Solution:
----------
The path of the library file "etm_pd_stack_lib_ppc2003_evc4.lib'" is too large.
It is less than the 255 characters but still it is the problem. if I copied my project directly to D:\ then I will not get any errors.
MSDN KB for LNK1181 Error:
--------------------------------------
SYMPTOMS
When you build a Microsoft Visual C++ .NET project in Microsoft Visual Studio .NET or a Microsoft Visual C++ 2005 project in Microsoft Visual Studio 2005, you may receive an error message that is similar to the following error message:
fatal error LNK1181: cannot open inputfile ‘f:\temp\test.obj’
Back to the top
CAUSE
This problem may occur when the path of the Intermediate file folder or the path of the Output file folder in the Visual C++ project starts with a leading backward slash (\). The IDE uses the drive from where it is launched. The IDE does not use the drive that the project uses.
Back to the top
WORKAROUND
To work around this problem, include the drive name for the Intermediate file folder and for the Output file folder. To edit the entries for the IntDir folder or for the OutDir folder, follow these steps:1. On the Project menu, click Properties Pages.
2. In the Properties Pages dialog box, click Configuration Properties.
3. In the General list, type new entries for the Output Directory items and for the Intermediate Directory items that include the drive names.

reference: http://support.microsoft.com/kb/839286

No comments: