Resolved Xcode - How to compile c++?

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

  1. KrrSplat macrumors member

    Apr 16, 2009
    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.

    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


    Nov 25, 2005
    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

    Apr 16, 2009
    Thank you so much :D

Share This Page