Creating a Project (Mac OS*)

Each Xcode project has a Groups & Files list where your project source files, targets, and executables are stored. Targets are the most important elements of the Groups & Files list. A target contains a set of instructions (for example, build settings and rules) for building the files in your project. A single project can have multiple targets; the currently active target determines how your project is built. For information on building targets, see Building the Target.

To create a new Xcode project:

  1. Launch the Xcode application in the Developer > Applications folder.

  2. Choose New Project from the File menu.

  3. When the New Project Assistant window appears, select a project under Command Line Utility.

Note

If you choose Standard Tool as shown above, you may have to delete the C main program that is automatically created.

  1. Name your project and specify an alternate directory if you do not want to use the default directory. Click Finish. This creates the named project, with a .xcodeproj extension.

To add a file to your Xcode project, choose Add > New File… or Add > Existing Files… from the Action pop-up menu in the toolbar. (The Existing Files… option may not be available, depending on which group in the Groups & Files list is selected.) To add a new Fortran file, choose either Fortran Free Format File or Fortran Fixed Format File, listed under BSD. Alternatively, you can choose New Empty File from the File menu and provide an appropriate Fortran file extension when you specify the file name.