问题
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