Resolved Xcode - How to compile c++?

Discussion in 'Mac Programming' started by KrrSplat, Aug 28, 2015.

  1. KrrSplat macrumors member

    Joined:
    Apr 16, 2009
    #1
    Sorry if this seems like a silly question but Im taking my first programming class and for the life of me I cannot figure out how to compile my program.

    Here is what I did:
    1) Open Xcode
    2) Select file > New
    3) Select C++ File under the Source tab under OSX
    4) Name File. I tried including header file. Didn't work
    5) Write Code
    6) This is where I am stuck.

    It should be noted that I also tried creating a c++ file without a header. Didn't work.

    Here is a screen shot of what I have going on.

    http://i.imgur.com/PpW0Rr1.png

    I have this exact code on the computer system at school and it compiles fine in Dev CPP. Can anyone help?
     
  2. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #2
    First step is "Project, new" not "File, new". Easiest is to choose a C++ command line tool for MacOS X.
     
  3. KrrSplat thread starter macrumors member

    Joined:
    Apr 16, 2009
    #3
    Thank you so much :D
     

Share This Page