Compatibility between Fortran compiler 12.1, Xcode 4.5 and Mountain Lion?

Compatibility between Fortran compiler 12.1, Xcode 4.5 and Mountain Lion?

Ritratto di IM C.

Hello, 

I am new to fortran and I recently installed the Intel Fortran compiler (version 12.1) on my Mac, which has Xcode 4.5 and OSX 10.8. As a starting point, I tried to compile the very simple program hello.F90:

- - - - -

program hello
print *, "So, this seems to be working now...."
end program hello

- - - - -

by typing in an xterm window the command: $ ifort hello hello.F90

 However, I get the following error: ld: can't link with a main executable for architecture x86_64

Is this a compatibility issue between my OS, Xcode and fortran version, or is it a much simpler bug that I am missing?

Many thanks in advance for your help.

5 post / 0 new
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di Ronald W Green (Intel)

that's an odd one.  What specific 12.1 version?

ifort -V

will let us know.

Next, did you do this first:

source /opt/intel/bin/ifortvars.sh intel64

then

ifort -o hello hello.f90    !you didn't show the -o argument but I'm assuming it's just a typo

ron

Ritratto di IM C.

Hi Ron, 

Thanks for your quick response.  My version is 12.1.4.  I had not entered the "source" command, thanks for that....the program now runs. The missing "-o" was a typo.

Ultimately, I would like to be able to use ifort to compile fortran subrutines in matlab using their mex files. Could you or someone in this forum point me to a webpage that has information on how to set up ifort on the mexopts.sh file? 

Again, thanks for your help!

Ritratto di Ronald W Green (Intel)

Probably the best source would be Mathworks "Answers" forum:  http://www.mathworks.com/matlabcentral/answers/

ron

Ritratto di IM C.

Thanks, Ron. I will see if I can get help at the Mathworks forum.

Accedere per lasciare un commento.