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

Problems with compiling "Hello World"- Program

winstonkl
Beginner
1,136 Views
Hello,
I'm quite new to Fortran and I'm in trouble.
I hope you can help me out.

I tried to compile and link the following Fortran Program:

program fortrantest

implicit none

print *, 'Hello World'

end program fortrantest

I saved it in ftest.f90 and compiled it with:
ifort ftest.f90.

The result was an Object-file.


Now i tried to link the object-file with the gnu linker "ld" but it didn't worked.
So now my question:
Do I can get it to work that I can link the object-file to an executable program?
If Yes, how? If Not, then why not?

Hope you can help me

Best regards,

winstonkl
0 Kudos
3 Replies
Steven_L_Intel1
Employee
1,136 Views
Intel Fortran for Windows does not work with the gnu tools. Are you using Windows or Linux?

On Windows, you must first install one of the prerequisite Microsoft development products (for command line only use, the free Visual C++ 2005 Express Edition will do) and then reinstall Intel Fortran.

You would then compile and link together using the:

ifort ftest.f90

line. My guess is that you got an error about it being unable to link and you tried ld instead, which simply won't work.
0 Kudos
winstonkl
Beginner
1,136 Views
I'm using Windows and thought I can use the Intel Fortran with the GNU-tools.
I found no real answer on this on the intel website.
But I went wrong.

Anyway, thanks for the answer.

Are there any plans to make the Intel Fortran Compiler work with the GNU-tools under windows?

Best regards,


winstonkl
0 Kudos
Steven_L_Intel1
Employee
1,136 Views
No plans. The GNU tools use an incompatible format.

As I said, you can get Visual C++ 2005 Express Edition for free, and that works just fine to provide the linker and libraries Intel Fortran needs.
0 Kudos
Reply