- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cygwin was installed first and then intel fortran compiler. I run cygwin at the ifort prompt and successfully compiled some fortran files, but there was an error with link showing: "link: unknown option --s".
Does anyone know how to solve the problem?
Thanks.
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should ensure that the Microsoft linker (link.exe) appears earlier in PATH than does the Cygwin link.exe, which creates symbolic links to existing files.
It that is not done, the Intel Fortran compiler does the compilation, and issues a LINK command to link the .OBJ and library files. However, because of the misconfigured PATH, this request is fielded by the Cygwin link.exe, which knows nothing special about object and library files.
It that is not done, the Intel Fortran compiler does the compilation, and issues a LINK command to link the .OBJ and library files. However, because of the misconfigured PATH, this request is fielded by the Cygwin link.exe, which knows nothing special about object and library files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We take care of this by adding the -Qlocation,link entry in ifort.cfg e.g. (varies according to your VS version)
-Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64"
-assume:minus0,protect_parens,buffered_io,byterecl
-Qprec-div -Qprec-sqrt
-Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64"
-assume:minus0,protect_parens,buffered_io,byterecl
-Qprec-div -Qprec-sqrt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
could you possibly tell me how to set the MS link.exe before the Cygwin link.ext? in which file?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You really need to use the provided compilervars.bat file to establish the environment before starting Cygwin. What I suggest doing is opening a Fortran Command Prompt window using the shortcuts provided by the compiler install and then start Cygwin from there. You need a lot more than just the linker location.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve, we have tried both of these options - your's and Tim's - together even.
We are still getting the error --s.
We ARE trying to run cygwin in the csh not the bash shell - does this make a difference?
Can you push us further?
Thanks!
Hope
We are still getting the error --s.
We ARE trying to run cygwin in the csh not the bash shell - does this make a difference?
Can you push us further?
Thanks!
Hope
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please show the command you are using to link. I have no experience using Cygwin, but I know many people do successfully use ifort in this environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I use Cygwin almost all the time, but in the following restricted way:
Instead of using the Cygwin shortcut to open a Cygwin command window, I open an IFort command window, and add c:\cygwin\bin to the tail end of PATH. This way, Cygwin tools are used only if there is no IFort/MS tool of the same name. If, at some time, I need to use Bash (to use the more versatile scripting facilities, for example), I type "bash", do the Bash-oriented work and then type "exit" to get back to the IFort environment.
Instead of using the Cygwin shortcut to open a Cygwin command window, I open an IFort command window, and add c:\cygwin\bin to the tail end of PATH. This way, Cygwin tools are used only if there is no IFort/MS tool of the same name. If, at some time, I need to use Bash (to use the more versatile scripting facilities, for example), I type "bash", do the Bash-oriented work and then type "exit" to get back to the IFort environment.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page