How can I use Intel oneAPI fortran compiler on macbook whith xcode or visual studio for Mac?

How can I use Intel oneAPI fortran compiler on macbook whith xcode or visual studio for Mac?


I'm using macbook pro 2021, intel cpu, macos 12.3.


I wish to program with fortran on Xcode or visual studio for Mac. I got Xcode 13.4.1, and downloaded intel oneAPI basekite(2022.2.0.226) and HPCKit(2022.2.0.158), installed. However, I still cann't find fortran in Xcode nor visual studio.

Could anybody help?

Posted on Jun 5, 2022 11:39 PM

Reply
Question marked as Top-ranking reply

Posted on Jun 6, 2022 12:40 PM

You'll be working with a different IDE or text editor (vim, emacs, VSC, whatever) and/or with command-line callouts to command-line Fortran compilations from Xcode, and probably with command-line build scripts, to get this to work.


Xcode itself has no support for Fortran.


Past Cocoa and Swift frameworks and related, Apple also doesn't document a mixed-language calling standard, akin to what is available on some other platforms.


A search for Xcode Fortran Monterey will find some previous discussions that might be helpful.

e.g.

https://stackoverflow.com/questions/71088796/how-to-install-gfortran-for-macos-monterey-version-12-2-1-m1

https://stackoverflow.com/questions/71507047/installed-macos-montery-and-gfortran-now-gives-error-ld-unsupported-tapi-fil


Usual issue for folks starting out here is finding where and then adding the necessary libraries into the compilation and linking paths, which is more of a slog of adding switches than anything else. Then figuring out how to call Swift from Fortran (probably via the C bindings?) will either be an effort, or some research finding somebody that's already done it.


If you want to develop in Fortran alone and not tied to other tooling, use VSC or Eclipse or whatever IDE, or use command-line builds and an ASCII-capable (yeah, technically probably UTF-8 encoded ISO Latin 1) text editor as has been done for decades on other platforms.

2 replies
Question marked as Top-ranking reply

Jun 6, 2022 12:40 PM in response to Namishizi

You'll be working with a different IDE or text editor (vim, emacs, VSC, whatever) and/or with command-line callouts to command-line Fortran compilations from Xcode, and probably with command-line build scripts, to get this to work.


Xcode itself has no support for Fortran.


Past Cocoa and Swift frameworks and related, Apple also doesn't document a mixed-language calling standard, akin to what is available on some other platforms.


A search for Xcode Fortran Monterey will find some previous discussions that might be helpful.

e.g.

https://stackoverflow.com/questions/71088796/how-to-install-gfortran-for-macos-monterey-version-12-2-1-m1

https://stackoverflow.com/questions/71507047/installed-macos-montery-and-gfortran-now-gives-error-ld-unsupported-tapi-fil


Usual issue for folks starting out here is finding where and then adding the necessary libraries into the compilation and linking paths, which is more of a slog of adding switches than anything else. Then figuring out how to call Swift from Fortran (probably via the C bindings?) will either be an effort, or some research finding somebody that's already done it.


If you want to develop in Fortran alone and not tied to other tooling, use VSC or Eclipse or whatever IDE, or use command-line builds and an ASCII-capable (yeah, technically probably UTF-8 encoded ISO Latin 1) text editor as has been done for decades on other platforms.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I use Intel oneAPI fortran compiler on macbook whith xcode or visual studio for Mac?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.