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

fortran source files in xocde 4

Burke_H_
Beginner
615 Views
I just went to lion and bought the newest version of the Intel compiler (Composer XE 2011, v 11.1.058). pretty much works as before, but I can't find the option to add a new fortran file to a project that existed in xcode 3.x. My old codes compile and execute just fine, the XE compiler is recognized as providing the build rules for fortran source files.
But I can's seem to find the interface to build a new fortran source file that had the nice syntax coloration and formatting freatures I'm used to. In Xcode 3.2.6, adding a new file generates a template selection window, and one of the options under the Mac OS X category, after 'other' is 'Fortran'. This option lets you select from either fixed or free format fortran files. In Xcode 4.1, all the same options are under Mac OS X except Fortran.
Is this a feature that didn't get incorporated into the upgrades of the compiler and Xcode, or am I doing something wrong?
Thanks, in advance.
0 Kudos
12 Replies
Burke_H_
Beginner
615 Views
I've been doing some more research on this, and found that there are directories for fixed (Fortran Fixed Format File.pbfiletemplate) and free (Fortran Free Format File.pbfiletemplate) directories in the Developer/Library/Xcode/Templates/File Templates/Fortran/ directory, just as there were in the old Xcode 3.x application.
They aren't recognized in the file selection window, and there doesn't seem to be a way to navigate to them.
0 Kudos
Jeffrey_A_Intel
Employee
615 Views

I can reproducethe problem you describe. I'll try to figure out what's happening.

Let me make sure though that we are both finding the Fortran templates in the same place:

For Xcode 3.*, the Fortran template directory should be at /Library/Xcode/File\ Templates/Fortran.

For Xcode 4.*, the Fortran template directory should be at /Library/Xcode/Templates/File\ Templates/Fortran.

Is that what you see?

0 Kudos
Burke_H_
Beginner
615 Views
Thanks, Jeff.
Short answer is yes. I can find the Fortran templates in three places:
1. for Xcode4: /Developer/Library/Xcode/Templates/File Templates/Fortran
2. For Xcode3: /Developer-3.x/Library/Xcode/Templates/File Templates/Fortran
3. For ?: /Library/Application Support/Apple/Developer Tools/File Templates/BSD.
Only the first two also include the AppleScript, C&C++, Cocoa, etc templates that show up in the 'Choose a template for your new file:' dialogue window that pops up on adding a new file.
Burke
0 Kudos
Jeffrey_A_Intel
Employee
615 Views

Are you sure of this part:

2. For Xcode3: /Developer-3.x/Library/Xcode/Templates/File Templates/Fortran

In Xcode 3.*, the path should be /Library/Xcode/File\ Templates/Fortran. Note: there is no .../Templates/... directory.

The Xcode 3.* path you show shouldn't work; and the Xcode 4.* path should work!


Also, you said "I just went to lion and bought the newest version of the Intel compiler (Composer XE 2011, v 11.1.058).)." But11.1 compilers weren't called Composer XE 2011 and they don't support Lion or Xcode 4.1. The first compiler to support Lion (and Xcode 4.1) was 12.0 update #5 which was in a kit called m_fcompxe_2011.5.209.dmg. 12.1 compilers were released last month so they are now the "latest."

0 Kudos
Burke_H_
Beginner
615 Views
Double checking:
Copied right out of the Get Info window for the directory "Fortran Fixed Format File.pbfiletemplate"
/Developer-3.1.4/Library/Xcode/File Templates/Fortran/
so you're right.
wrt the version number of the compiler, It shows up as 12.1 in the build rules window in Xcode, but the version #s for the .dmg'son the disc that I just purchased are 2011.0.85, e.g.:

m_fcompxe_redist_2011.0.085.dmg
and for the upgrade I subsequently downloaded were 2011.0.85, e.g.:
m_fcompxe_2011.6.038.dmg
I was looking at an older compiler folder with the errant version number. I think I have the correct version of 12.1 installed.
0 Kudos
Jeffrey_A_Intel
Employee
615 Views
Okay, no .../Templates/... in the Xcode 3.* path. Good.

m_fcompxe_2011.6.038.dmg is the initial release of the 12.1 compiler, so you've now got the latest. It was the 11.1.058 which had me concerned but that was just where you started.

Next, figure out why Xcode 4.1 isn't see the Fortrantemplates. That may take longer...

Stay tuned.
0 Kudos
Burke_H_
Beginner
615 Views
Will do. Thanks.
0 Kudos
Wich
Beginner
615 Views
Hello!

I' m having the same problem(but I have Xcode 4.0.2 with the latest intel compiler), this is an old quote from myself that i posted on this very same forum:
[bash]2) When you want to create a new file the Fortran option is no longer there. I made it reappear by changing the extension of the folders in /Developer/Library/Xcode/Templates/File Templates/Fortran from .pbfiletemplate to .xctemplate.[/bash]
As I really don't like messing with "system files" I'm not using this workaround but rather when I need to create a new file I choose Other --> Empty and I give the name an explicit fortran extension(.f90,.f95,etc) and the compiler picks it up correctly.

Cheers!

Luca
0 Kudos
Jeffrey_A_Intel
Employee
615 Views
The problem exists when integrating any version of ifort 12.0 which supportsXcode 4.n, where n = 0, 1 or 2, into the Xcode IDE.

Your solution is a reasonable work-aroundfor the moment. Although you may consider these to be "system files," they are in factcreated when ifort is integrated into Xcode 4.*. If you mess something up with them, you can probably fix it by uninstalling/reinstalling ifort (and perhaps Xcode).

There are some other things about these template fileswhich need fixing as well for Xcode 4.*. I would expect to see thefixes in a future update to 12.1 (but not in the one which will be appearing in the next few weeks; it's too late to get the fixes in for that).
0 Kudos
Burke_H_
Beginner
615 Views
Thanks, Luca--
I tried your fix, and the new file selection window now recognizes fortran templates, but doesn't load the 'file.for' file, and doesn't give any of the syntax color and file formatting benefits that worked in Xcode 3.x.
Burke
0 Kudos
Burke_H_
Beginner
615 Views
check that-- it does load the file.for header, but doesn't give the syntax assistance.
0 Kudos
Ron_Green
Moderator
615 Views
ifort 11.1 is not supported and will not work with Lion and Xcode 4.x. You will need the 12.0 compiler Update 6.

You can get that from https://registrationcenter.intel.com, assuming your support contract is up to date you should see the v12 compilers for download.

ron
0 Kudos
Reply