Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Cygwin with ifort

chtusr
Beginner
749 Views
Hi
I am new to this group. I am using an intel fortran compiler 10.1.011 on a windows XP machine. I am trying to configure ifort to work with cygwin. I have defined path for the compiler and its libraries in my environment variables. When I type "which ifort" in cygwin the path of the compiler is returned. When I try to run a simple program such as Hello World using "ifort hello.f90 -o hello" the output file is not created. What do I need to change?
If this problem has been discussed before, please point me towards the link.

Thanks
0 Kudos
4 Replies
TimP
Honored Contributor III
749 Views
Parts of this subject have been covered at various times.
Your first problem is not recognizing that running under the cygwin shell doesn't change the command format recognized by ifort. No one is translating -o to -Fe if that is what you intend.
$ ifort hello.f90
should create hello.exe
provided that you don't run into the problem of cygwin link.exe coming ahead of Visual Studio link.exe. That can be avoided by setting the linker path in ifort.cfg.
If you want it named simply hello, you may require
mv hello.exe junk
mv junk hello
0 Kudos
chtusr
Beginner
749 Views
Tim,
Thanks for your reply. when I run $ ifort hello.f90 no exe file is produced. The ifort.cfg file looks like this

# This Configuration file may be used for additional switches

# Enable Microsoft Visual C++* 8.0 compatibility
-Qvc8

# Path to Microsoft Visual C++* 8.0 linker
-Qlocation,link,"C:Program FilesMicrosoft Visual Studio 8VCBin"

# *Other names and brands may be claimed as the property of others


How do I need to modify this?

0 Kudos
TimP
Honored Contributor III
749 Views
The ifort.cfg looks fine, if it matches your installed VC8, and you are using ifort ia32.
If ifort simply dies with no messages, that may indicate you broke its own paths so it doesn't find a needed .dll.
I simply open the ifort cmd window and type cygwincygwin so as to prepend cygwin paths without removing the standard ifort ones. Cygwin complains once in a while about the Windows style paths, but that's just a warning.
0 Kudos
chtusr
Beginner
749 Views
Quoting - tim18
The ifort.cfg looks fine, if it matches your installed VC8, and you are using ifort ia32.
If ifort simply dies with no messages, that may indicate you broke its own paths so it doesn't find a needed .dll.
I simply open the ifort cmd window and type cygwincygwin so as to prepend cygwin paths without removing the standard ifort ones. Cygwin complains once in a while about the Windows style paths, but that's just a warning.
Thanks Tim,
The solution you suggested works nicely.
0 Kudos
Reply