Creating a cpp project in xcode on macos

Материал из Wiki - Факультет компьютерных наук
Перейти к навигации Перейти к поиску
  1. Open Xcode
  2. In the Xcode welcome window choose “Create a new Xcode project”

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

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

  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.

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

  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.

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