getting Cygwin to know about microsoft cl and nmak

2020-07-29 15:41发布

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条回答
Viruses.
2楼-- · 2020-07-29 16:29

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.

查看更多
登录 后发表回答