求解:为什么出错??
我刚学C++,正在读C++Primer发现其中有一个简单的例子是说输入两个数求和的#include <iostream>
int main()
{
std::cout << "Enter two numbers:" << std::endl;
int v1, v2;
std::cin >> v1 >> v2;
std::cout << "The sum of " << v1 << " and " << v2
<< " is " << v1 + v2 << std::endl;
return 0;
}
源代码是从书的官方网下的
<html>
<body>
<pre>
<h1>Build Log</h1>
<h3>
--------------------Configuration: Cpp1 - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\WINDOWS\Temp\RSP319.tmp" with contents
[
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/Cpp1.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
"C:\Documents and Settings\Admin\桌面\Cpp1.cpp"
]
Creating command line "cl.exe @C:\WINDOWS\Temp\RSP319.tmp"
Creating temporary file "C:\WINDOWS\Temp\RSP31A.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/Cpp1.pdb" /debug /machine:I386 /out:"Debug/Cpp1.exe" /pdbtype:sept
".\Debug\Cpp1.obj"
]
Creating command line "link.exe @C:\WINDOWS\Temp\RSP31A.tmp"
<h3>Output Window</h3>
Compiling...
Cpp1.cpp
Linking...
LINK : fatal error LNK1104: cannot open file "libcpd.lib"
Error executing link.exe.
<h3>Results</h3>
Cpp1.exe - 1 error(s), 0 warning(s)
</pre>
</body>
</html>
我是用VC 6.0编译的
各位高手,为什么会出错呢??