注册 登录
编程论坛 C++教室

小弟有个编译问题请教

niitzz 发布于 2011-09-28 22:21, 1016 次点击
各位大侠们,小弟有个问题向大家请教下
小弟新装的visual c++ 6.0  装完后写了个小程序,compile没有问题 build 时出现LINK : fatal error LNK1104: cannot open file "Debug/test.exe"错误
而且安装目录下也没有myproject文件夹,不知道是啥原因,有哪位兄弟给小弟指点迷津呀
3 回复
#2
lkz1987n2011-09-29 00:13
程序代码:
Linker Tools Error LNK1104
Send Feedback

Updated: November 2007

Error Message
cannot open file 'filename'


The tool could not open the given file.

To fix by checking the following possible causes:

Not enough disk space.

File does not exist.

When specifying libraries in a project's property pages dialog box, library names should be separated by spaces (and not commas).

Incorrect filename or path.

Invalid drive specification.

Insufficient file permissions.

Path for filename expands to more than 260 characters.

If the given file is named LNKn, which is a filename generated by the linker for a temporary file, the directory specified in the TMP environment variable may not exist, or more than one directory is specified for the TMP environment variable. (Only one directory path should be specified for the TMP environment variable.)

If the error message occurs for a library name, and you recently ported the .mak file from a previous Microsoft Visual C++ development system, the library may no longer be valid. Ensure that the library still exists in this circumstance.

Another program may have the file open and the linker cannot write to it.

Incorrect LIB environment variable. For information on how to update the LIB environment variable, see VC++ Directories, Projects and Solutions, Options Dialog Box . Make sure any directories with libraries you need are listed here.

The linker uses temporary files in several cases. Even if you have sufficient disk space, a very large link can deplete or fragment the address space.

To fix by using the following possible solutions

Use /OPT (Optimizations); doing transitive comdat elimination reads all the object files multiple times.

Upgrade to Windows XP.

自己要学会利用msdn来自己解决问题。虽然刚开始很痛苦,但是熟练应用msdn,对你好处大大的。自己翻译看看哪里出问题了。
#3
laznrbfe2011-09-29 09:42
回复 2楼 lkz1987n
在哪里查看?谢谢。
#4
mengcan5552011-10-02 22:24
将工程存到自己的文件当中,而不是默认文件夹里面。原因暂时不知,但能够解决问题
1