getting Cygwin to know about microsoft cl and nmake?

和自甴很熟 提交于 2019-12-23 05:16:33

问题


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


回答1:


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"

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



来源:https://stackoverflow.com/questions/28310268/getting-cygwin-to-know-about-microsoft-cl-and-nmake

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!