Xcode: multiple files in project

Discussion in 'Mac Apps and Mac App Store' started by notwist, Mar 7, 2008.

  1. notwist macrumors regular

    Joined:
    Dec 29, 2006
    Location:
    New Brunswick, NJ
    #1
    I just began using xcode. If I have multiple source files (.cpp) in a single project, how do I only build and run a single one? Whenever I try to build it, it only affects main.cpp.
     
  2. Eraserhead macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #2
    Setup a target with only the file you're interested in in it, or just use the command line.
     
  3. notwist thread starter macrumors regular

    Joined:
    Dec 29, 2006
    Location:
    New Brunswick, NJ
  4. Eraserhead macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #4
    Targets are really difficult to setup actually. Maybe the best is just to remove the files you aren't using from the current target. Select the files you aren't using>press command-I>choose Targets, and uncheck them from the target.
     

Share This Page