How to Compile C++ Programs

How to Compile C++ Programs

How to compile C++ programs Apple provides an Integrated Development Environment (IDE) called XCode. XCode comes on your OS 10.5 distribution disk called “Developers Tools”, and it is also available free for you to download at: http://developer.apple.com/technology/xcode.html You will have to get a free Apple Developer Connection membership in order to download XCode. Only the most recent version of XCode will compile C++ programs. This means you must have OS 10.5 installed on your Macintosh, together with XCode 3.1.2. If you have an older Macintosh, one that is not able to run OS 10.5, you will have to use the computers in the lab here at Foothill to do your homework. 1. Install XCode 3.1.2 from the URL above. 2. After installation, locate and run the XCode application 3. From XCode’s FILE menu, choose “New Project...” 4. On this dialog box, scroll down until you see “Carbon C++ Application” and choose it. Name your new project “Lab1” and choose where on your hard disk to store it. 5. When the new project dialog box is finished, you will see a project on the left side of the window and a folder called “Sources” below it. Click on the triangle next to “Sources’ to open that folder and double click the file “Main.cp” to open it in the editor portion of that window. The editor is the lower right frame of the window. 6. Delete the contents of the editor frame and replace it with the program you would like to write. Choose File‐Save. 7. Pull down the FIle menu and choose Run. Pull down the Run menu and choose Console so that you can see the output of your program. 8. If you like your output, select it from the console window and choose Edit – Copy to put your output on the console. Place your cursor into the bottom of your source code in the Editor frame and choose Edit‐Paste. Place comment markers around your output so that this source code file will continue to compile and run. Choose File‐Save again. 9. Find the file (probably called “main.cp”) on your hard disk and submit it through etudes. .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    1 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us