Creating a cpp project in xcode on macos — различия между версиями
Материал из Wiki - Факультет компьютерных наук
Iko (обсуждение | вклад) (Новая страница: «= Creating a <code>C++</code> project in Xcode on macOS = # Open Xcode # In the Xcode welcome window choose “Create a new Xcode project” Файл:Creating…») |
Iko (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
− | |||
− | |||
# Open Xcode | # Open Xcode | ||
# In the Xcode welcome window choose “Create a new Xcode project” | # In the Xcode welcome window choose “Create a new Xcode project” | ||
− | [[Файл:Creating a C++ project in Xcode 1.png]] | + | [[Файл:Creating a C++ project in Xcode 1.png|700x700px]] |
<ol start="3" style="list-style-type: decimal;"> | <ol start="3" style="list-style-type: decimal;"> | ||
<li>In the new window choose <code>macOS</code> → <code>Command Line Tool</code> and click “Next”</li></ol> | <li>In the new window choose <code>macOS</code> → <code>Command Line Tool</code> and click “Next”</li></ol> | ||
− | [[Файл:Creating a C++ project in Xcode 2.png]] | + | [[Файл:Creating a C++ project in Xcode 2.png|700x700px]] |
<ol start="4" style="list-style-type: decimal;"> | <ol start="4" style="list-style-type: decimal;"> | ||
<li>Choose a project name. The organisation identifier doesn’t matter, write a funny word. '''Change the language to <code>C++</code>.'''</li></ol> | <li>Choose a project name. The organisation identifier doesn’t matter, write a funny word. '''Change the language to <code>C++</code>.'''</li></ol> | ||
− | [[Файл:Creating a C++ project in Xcode 3.png]] | + | [[Файл:Creating a C++ project in Xcode 3.png|700x700px]] |
<ol start="5" style="list-style-type: decimal;"> | <ol start="5" style="list-style-type: decimal;"> | ||
Строка 20: | Строка 18: | ||
<li>Uncheck “Create Git repository on my Mac”. I’m almost certain you won’t need it.</li></ol> | <li>Uncheck “Create Git repository on my Mac”. I’m almost certain you won’t need it.</li></ol> | ||
− | [[Файл:Creating a C++ project in Xcode 4.png]] | + | [[Файл:Creating a C++ project in Xcode 4.png|700x700px]] |
<ol start="7" style="list-style-type: decimal;"> | <ol start="7" style="list-style-type: decimal;"> | ||
<li>Choose <code>main.cpp</code> from the side bar. This is where you write your code.</li></ol> | <li>Choose <code>main.cpp</code> from the side bar. This is where you write your code.</li></ol> | ||
− | [[Файл:Creating a C++ project in Xcode 5.png]] | + | [[Файл:Creating a C++ project in Xcode 5.png|700x700px]] |
<ol start="8" style="list-style-type: decimal;"> | <ol start="8" style="list-style-type: decimal;"> | ||
Строка 31: | Строка 29: | ||
<li>A bottom panel should show up but it doesn’t have the program output. Click the “Show the Console” button in the bottom right.</li></ol> | <li>A bottom panel should show up but it doesn’t have the program output. Click the “Show the Console” button in the bottom right.</li></ol> | ||
− | [[Файл:Creating a C++ project in Xcode 6.png]] | + | [[Файл:Creating a C++ project in Xcode 6.png|700x700px]] |
<ol start="10" style="list-style-type: decimal;"> | <ol start="10" style="list-style-type: decimal;"> | ||
<li>You should now see “Hello, World!” Printed in the console.</li></ol> | <li>You should now see “Hello, World!” Printed in the console.</li></ol> | ||
− | [[Файл:Creating a C++ project in Xcode 7.png]] | + | [[Файл:Creating a C++ project in Xcode 7.png|700x700px]] |
Текущая версия на 03:07, 9 января 2019
- Open Xcode
- In the Xcode welcome window choose “Create a new Xcode project”
- In the new window choose
macOS
→Command Line Tool
and click “Next”
- Choose a project name. The organisation identifier doesn’t matter, write a funny word. Change the language to
C++
.
- Click “Next” and choose where to save the project
- Uncheck “Create Git repository on my Mac”. I’m almost certain you won’t need it.
- Choose
main.cpp
from the side bar. This is where you write your code.
- Compile and run your project by clicking the “Run” (▸) button
- A bottom panel should show up but it doesn’t have the program output. Click the “Show the Console” button in the bottom right.
- You should now see “Hello, World!” Printed in the console.