Posted 22 January 2010 - 06:53 AM
Posted 02 February 2010 - 08:30 PM
Posted 03 February 2010 - 06:43 PM
The steps are:
1. Launch Xcode.
2. Choose New Project from the File menu.
3. Select whatever project type you are targeting. If you ultimately want an application, select something like Cocoa Application. If you are just trying to build a command-line utility, select one of the tools—for example, Standard Tool.
4. Follow the prompts to name and save your project. A new default project of that type is opened.
5.Open the Targets disclosure triangle and delete any default targets that may exist.
6. From the Project menu, Choose New Target.
7. Select “External Target” from the list. If this is not shown in the “Special Targets” list, you are not running the latest version of Xcode. Upgrade first.
8. Follow the prompts to name that target. When you have done this, a target icon with the name you just gave it appears in the Targets pane of the open Xcode window.
9. Double-click that new target. You should now see a new window with the build information for this target. This is not the same thing as clicking info. You must double-click the target itself.
10. In the “Custom Build Command” section of the target inspector, change the field called “Directory” to point to the directory containing your makefile, and change any other settings as needed. For example, in the Custom Build Settings pane, you could change Build Tool from /usr/bin/gnumake to /usr/bin/bsdmake. More information on the fields is available in Xcode Help.
11. Change the active target to your new target by choosing "Set Active Target" from the Project menu.
12. Add the source files to the project. To do this, first open the disclosure triangle beside the “Source” folder in the left side of the project window. Next, drag the folder containing the sources from the Finder into that “Source” folder in Xcode. Tell Xcode not to copy files. Xcode will recursively find all of the files in that folder. Delete anything you don’t want listed.
13. When you are ready to build the project, click the Build and Run button in the toolbar, select Build from the Build menu, or just press Command-B.
14. Once the project is built, tell Xcode where to find the executable by choosing “New Custom Executable” from the Project menu. Choose the path where the executable is located, then add the name of the executable.
15. Run the resulting program by pressing Command-R.
Read some of the Apple article. It's really helpfull.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users