Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
公告
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29281 讨论

Problems with compiling "Hello World"- Program

winstonkl
初学者
1,151 次查看
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 项奖励
3 回复数
Steven_L_Intel1
1,151 次查看
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 项奖励
winstonkl
初学者
1,151 次查看
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 项奖励
Steven_L_Intel1
1,151 次查看
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 项奖励
回复