Download presentation
Presentation is loading. Please wait.
Published byPaul Nash Modified over 6 years ago
1
Auburn University http://www.eng.auburn.edu/~xqin
COMP 2710 Software Construction xCode Development Environment for C++ Programming in Mac OS Dr. Xiao Qin Auburn University This is an all-in-one version, which include: Lec01b1-Write your first c++ program.ppt Lec01b2-Using the Eclips IDE Note that a warming-up exercise is in a separate file: Lec01b2- Warming-up Exercises.ppt (this one is NOT covered in the lecture) To be continued on page 10.
2
xCode in Mac OS C or C++ development with XCode
XCode for iPhone and iOS Reference:
3
xCode Offers A powerful IDE Command line tools: g++ and gcc 1-3 3
4
What is xCode? Provide a GUI editor (like Visual Studio)
Provide an interface that includes a project into which program files are loaded (like Eclips and jGrasp) Allow you to compile a program and displays any error messages generated Allow you to run a program and provide an output window with results You can either download the full XCode environment including documentation (2.3GB) or download a stripped-down version that that is about 750MB. If you want to download the smaller version of XCode that doesn't include documentation, click on "Developer Downloads". (Much of the documentation will not be relevant to you when you are just starting to learn C++, and the Apple website itself already makes extensive documentation available.) Click on "Developer Tools" under the "Downloads" sidebar Search for the latest version of XCode (you want something like that looks like "XCode X.Y.Z Developer Tools", for example "XCode Developer Tools") 1-4 4
5
Downloading xCode Register as an Apple developer It is free Download at Mac Dev Center: Full version (2.3GB) or stripped-down (750MB) You can either download the full XCode environment including documentation (2.3GB) or download a stripped-down version that that is about 750MB. If you want to download the smaller version of XCode that doesn't include documentation, click on "Developer Downloads". (Much of the documentation will not be relevant to you when you are just starting to learn C++, and the Apple website itself already makes extensive documentation available.) Click on "Developer Tools" under the "Downloads" sidebar Search for the latest version of XCode (you want something like that looks like "XCode X.Y.Z Developer Tools", for example "XCode Developer Tools") 1-5 5
6
Downloading xCode http://developer.apple.com/technology/xcode.html
Reference: Double click the Disk Image of xCode 1-6 6
7
Installing xCode: Follow the usual Apple installer routine
Reference: Double click the Disk Image of xCode Follow the usual Apple installer routine When the process is done, you’ll have a brand-new set of Developer Tools, installed and ready for your use. 1-7 7
8
Installing xCode from Terminal
Reference: 1-8 8
9
Inside the Terminal window
Type: (do not type $) $xcode-select --install 1-9 9
10
Install the command line tools
1-10 10
11
How to install the g++ compiler in Mac OS?
It comes with the Apple's XCode tools You can either download the full XCode environment including documentation (2.3GB) or download a stripped-down version that that is about 750MB. If you want to download the smaller version of XCode that doesn't include documentation, click on "Developer Downloads". (Much of the documentation will not be relevant to you when you are just starting to learn C++, and the Apple website itself already makes extensive documentation available.) Click on "Developer Tools" under the "Downloads" sidebar Search for the latest version of XCode (you want something like that looks like "XCode X.Y.Z Developer Tools", for example "XCode Developer Tools") 1-11 11
12
Type in the Terminal window: (do not type $)
Have you installed g++? Type in the Terminal window: (do not type $) $g++ --version 1-12 12
13
How to create a c++ project in xCode?
Open xCode, then: “Tools -> C++ Tool” Reference: Reference: 1-13 13
14
Name and Path of the Project
1-14 14
15
What items are in myProject?
In the "myProject" window, you will see that a program named "main.cpp" has been created and installed in the project by default. (Sometimes these wizards are a little too helpful, if you know what I mean.) This program almost certainly does not do what you want it to do, but it is a fully-functioning C++ program. This means you can compile and run it right now. Go ahead, if you must. We'll wait for you to get it out of your system. 1-15 15
16
You may change the name of the source code file
select File->Save As... In the "myProject" window, you will see that a program named "main.cpp" has been created and installed in the project by default. (Sometimes these wizards are a little too helpful, if you know what I mean.) This program almost certainly does not do what you want it to do, but it is a fully-functioning C++ program. This means you can compile and run it right now. Go ahead, if you must. We'll wait for you to get it out of your system. 1-16 16
17
Modify your source code file
1-17 17
18
Compile and run your program
1-18 18
19
Watch this YouTube Video for more information on xCode
Length 8:24 1-19 19
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.