让Cygwin知道关于microsoft cl和nmake? [英] getting Cygwin to know about microsoft cl and nmake?

查看:793
本文介绍了让Cygwin知道关于microsoft cl和nmake?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用以下命令编译Cygwin中的Fortran运行时库( f2c ): nmake -f makefile.vc all
在包中给出的每个指令,首先我必须让Cygwin知道Microsoft cl 编译器和 nmake 。我如何在Cygwin中这样做?
我已经将 vcvarsall.bat 添加到 Cygwin.bat 文件,但我不知道可以为 nmake 做。此时,我收到此错误: -bash nmake:command not found

I am trying to compile the Fortran runtime library (f2c) in Cygwin using this command: nmake -f makefile.vc all Per instruction given in the package, first I have to let Cygwin know about Microsoft cl compiler and nmake. How can I do this in Cygwin? I already added vcvarsall.bat to the Cygwin.bat file but I don't know what I can do for nmake. At this moment, I get this error: -bash nmake: command not found

推荐答案

nmake 可执行路径应存在于您的 $ PATH 环境变量中。你应该编辑.bashrc文件来实现这一点。可以在这里找到: /home/user/.bashrc 或者如果你喜欢Windows编辑器,然后: c:\cygwin\home\\ \\ user \.bashrc

nmake executable path should be present in your $PATH environment variable. You should edit .bashrc file to achieve this. It could be found here: /home/user/.bashrc Or if you prefer a windows editor then: c:\cygwin\home\user\.bashrc

使用正确的路径将此行添加到文件末尾:

Add this line with the correct path to the end of the file:

export PATH="$PATH:/cygdrive/c/Program Files/path_to_dir_which_contains_nmake.exe"

之后,应该启动一个新的cygwin终端,您可以使用 nmake 命令。

After that a new cygwin terminal should be started, in which you can use nmake command.

这篇关于让Cygwin知道关于microsoft cl和nmake?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆