After I installed C::B in my Windows XP, I used the wizard generate one project of console application for test C::B.
The code as following:
#include <iostream>
using namespace std;
int main()
{
CTest testor;
cout << "Hello world!" << endl;
return 0;
}
But, unfortunately ,I got the error message as following. I have no ideal with this ,anybody can give me any hint? Thank.
LINK : fatal error LNK1181: cannot open input file 'Files\Microsoft.obj'
This is my enviroment:
1, OS : XP
2, C::B version (SVN 3858)
3, C++ compiler MSVC 2005
I don't think it's the 'spaces inna path' bug, because that'd mean the path it passed originally was something like:
C:/Program Files/Microsoft.obj
?
Would make more sense if there's some actual "Files/Microsoft.obj" directory somewhere in the default MSVC path when it's properly set?
I don't think it's the 'spaces inna path' bug, because that'd mean the path it passed originally was something like:
C:/Program Files/Microsoft.obj
?
Would make more sense if there's some actual "Files/Microsoft.obj" directory somewhere in the default MSVC path when it's properly set?
FYI: output with "compiler logging" turned to full.
"Setting" -> "Compiler and Debugger"
Select your compiler
Select "Other Settings"
Set "Compiler Logging" to "Full command Line"
-------------- Build: Release in Test2 ---------------
cl.exe /nologo /W3 /EHsc /Ox /DNDEBUG /MD /I"C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\include" /I"C:\Program Files\Microsoft Visual Studio 8\VC\include" /c main.cpp /Foobj\Release\main.obj
main.cpp
link.exe /nologo /LIBPATH:"C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio 8\VC\lib" /out:bin\Release\Test2.exe msvcrt.lib msvcprt.lib obj\Release\main.obj
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 0 warnings
Oh,Thank you, stahta01. Your answer is very useful for me to see the cmd line ,:) .
But I got the following build log:
-------------- Build: Debug in test001 ---------------
......
link.exe /nologo /LIBPATH:"C:\Program Files\Microsoft Visual Studio 8\VC\lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib\" /LIBPATH:"C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\lib\" /out:bin\Debug\test001.exe obj\Debug\main.obj /DEBUG
LINK : fatal error LNK1181: cannot open input file 'Files\Microsoft.obj'
Process terminated with status 1181 (0 minutes, 2 seconds)
1 errors, 0 warnings
So , It seemed like because of the blankspace in the LIBPATH enviroment variable,and C::B split the command line by blankspace. :(
As you know, reinstall VS2005 is a hardwork, anyone have any fix hint for this bug?
Maybe it is really the right time to install one gcc in my laptop.
And thank all the replier in this topic.
Oh,Thank you, stahta01. Your answer is very useful for me to see the cmd line ,:) .
But I got the following build log:
-------------- Build: Debug in test001 ---------------
......
link.exe /nologo /LIBPATH:"C:\Program Files\Microsoft Visual Studio 8\VC\lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib\" /LIBPATH:"C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\lib\" /out:bin\Debug\test001.exe obj\Debug\main.obj /DEBUG
LINK : fatal error LNK1181: cannot open input file 'Files\Microsoft.obj'
Process terminated with status 1181 (0 minutes, 2 seconds)
1 errors, 0 warnings
So , It seemed like because of the blankspace in the LIBPATH enviroment variable,and C::B split the command line by blankspace. :(
As you know, reinstall VS2005 is a hardwork, anyone have any fix hint for this bug?
Maybe it is really the right time to install one gcc in my laptop.
And thank all the replier in this topic.
I suggest seeing if the problem is in the batch file %VS80COMNTOOLS%vsvars32.bat
I think that the "\" right before the quote is the problem. I have no idea if this is caused by the vsvars32.bat file but it is possible. I posted the copy of a line(s) that might be the problem line below. Note, I only have express version installed at current time, so my batch may be different than yours. There is another file to check but not sure what it is.
Tim S
@set LIB=C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio 8\VC\LIB;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib;%LIB%
@set LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\LIB