I have just started learning C programming and using Xcode 4.6.2. When I create a new target for my Xcode project, everything works but Xcode only runs the original target's main class. How can I run my new target's main class?
If you have a second, separate source code file that contains your " main
" function, you can set it's "target membership" by using the "file inspector" (which appears along the right side of the Xcode window).
It looks like this:
The idea here is that you'll have one " main
" function in one file for your first target, and a separate " main
" function in another file for your second target.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.