回 帖 发 新 帖 刷新版面

主题:这样的错误,是什么错误,不明白

我的程序:
           program exam6_1
    character*6 grade
    write(*,"('输入学生成绩:'\)")
    read *,s
    if(s>=60) then
    grade='合格'
    else
    grade='不合格'
    endif
    print *,'该学生是一个',grade,'学生。'
    end
    
    总是出现这样的错误:
LINK : fatal error LNK1104: cannot open file "kernel32.lib"
    请求帮助,谢谢了

回复列表 (共3个回复)

沙发

编译器安装好了吗?

板凳


Linker Tools Error LNK1104
cannot open file "filename"
The tool could not open the given file. One of the following may be a cause:
l There was not enough disk space.
l The file does not exist.
l The filename or its path was incorrectly specified.
l The specified drive is invalid.
l The file does not have the appropriate permissions.
l The path for filename expands to more than 260 characters.
l If the given file is named LNKn, which is a filename generated by the linker
for a temporary file, then 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.)
l If the error occurs on the executable filename, an earlier version of the
executable may still be running. You will need to terminate the executable
before linking it. In Windows NT (including Windows 2000) or Windows 95,
you can use the utility PVIEW to look for and kill instances of the
application.
l If the error message occurs for a library name, and you recently ported
the .MAK file from a previous Microsoft Visual C++ development environment, the library may no longer be valid. Ensure that the library still
exists in this circumstance.
l If the error message occurs for a library name such as CONSOLE.LIB, and
you included object modules from an older Fortran development
environment such as Microsoft Fortran PowerStation, recompile all source
files with Visual Fortran to create new object files and libraries.

3 楼

我可以运行

输入学生成绩:50
 该学生是一个不合格学生。
Press any key to continue

输入学生成绩:79
 该学生是一个合格  学生。
Press any key to continue

我想可能是你的程序路径里有中文,比如
C:\Documents and Settings\Administrator.773CCC4B8A7A46B\桌面\test.f90

我来回复

您尚未登录,请登录后再回复。点此登录或注册