- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Probably the best source would be Mathworks "Answers" forum: http://www.mathworks.com/matlabcentral/answers/
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Ron. I will see if I can get help at the Mathworks forum.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page