Hello World for C in Xcode
Feb. 9, 2017 | smlee36 | #seneca, #c, #beginner, #xcode, #helloworld, #Raphael
This is an ultra simple tutorial for making 'Hello World' c program in Xcode.
TOC
Run Xcode
- Run Xcode 'Application > Xcode'
![xcode start image](../media/posts/hello_world_for_c_in_xcode/xcode_1.png)
- Choose 'Create a new Xcode project'
![xcode start image](../media/posts/hello_world_for_c_in_xcode/xcode_2.png)
- Choose 'OS X > Application > Command Line Tool' then press
![xcode start image](../media/posts/hello_world_for_c_in_xcode/xcode_3.png)
- Fill in the Blanks like an example. Choose Language 'C'.
![xcode start image](../media/posts/hello_world_for_c_in_xcode/xcode_4.png)
- Now, you can see the windows where your project will be saved.
Press 'New Folder' at left bottom of window and write 'workspace' and 'Create'
and 'Create'.
![xcode start image](../media/posts/hello_world_for_c_in_xcode/xcode_5.png)
- Now Xcode is ready to start. Click 'main.c' on left pane.
![xcode start image](../media/posts/hello_world_for_c_in_xcode/xcode_6.png)
- There are already coded to display "Hello, World!".
![xcode start image](../media/posts/hello_world_for_c_in_xcode/xcode_7.png)
- Choose 'Product > Run' (⌘ + R), the output will be showed bottom window.
Preference to Show Line Numbers
- Choose 'Xcode > Preperences' (⌘ + ,) and select 'Text editing'.
- Check 'Line numbers'
![xcode start image](../media/posts/hello_world_for_c_in_xcode/xcode_8.png)
- Now line numbers are displayed on code pane.
![xcode start image](../media/posts/hello_world_for_c_in_xcode/xcode_9.png)