Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

notwist

macrumors regular
Original poster
Dec 29, 2006
191
0
New Brunswick, NJ
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.
 
Setup a target with only the file you're interested in in it, or just use the command line.
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.