Creating a cpp project in xcode on macos — различия между версиями

Материал из Wiki - Факультет компьютерных наук
Перейти к: навигация, поиск
(Новая страница: «= Creating a <code>C++</code> project in Xcode on macOS = # Open Xcode # In the Xcode welcome window choose “Create a new Xcode project” Файл:Creating…»)
 
 
Строка 1: Строка 1:
= Creating a <code>C++</code> project in Xcode on macOS =
 
 
 
# 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

  1. Open Xcode
  2. In the Xcode welcome window choose “Create a new Xcode project”

Creating a C++ project in Xcode 1.png

  1. In the new window choose macOSCommand Line Tool and click “Next”

Creating a C++ project in Xcode 2.png

  1. Choose a project name. The organisation identifier doesn’t matter, write a funny word. Change the language to C++.

Creating a C++ project in Xcode 3.png

  1. Click “Next” and choose where to save the project
  2. Uncheck “Create Git repository on my Mac”. I’m almost certain you won’t need it.

Creating a C++ project in Xcode 4.png

  1. Choose main.cpp from the side bar. This is where you write your code.

Creating a C++ project in Xcode 5.png

  1. Compile and run your project by clicking the “Run” (▸) button
  2. A bottom panel should show up but it doesn’t have the program output. Click the “Show the Console” button in the bottom right.

Creating a C++ project in Xcode 6.png

  1. You should now see “Hello, World!” Printed in the console.

Creating a C++ project in Xcode 7.png