I want to use Xcode to create a single cpp file to do my assignment, instead of creating a whole project with several files and directories, is there anyway to do it? Thanks.
-
1Are you in school to learn? Creating a "whole project with several files and directories" would be a great way to do it. If you don't enjoy doing such stuff, perhaps you should re-evaluate your career path.HalR– HalR2013-06-08 05:13:40 +00:00Commented Jun 8, 2013 at 5:13
-
@HalR the question I answered, and the one that I think the OP is asking is how to create a project in xcode that isn't an ios or mac app, but instead one that runs in the command lineaaronman– aaronman2013-06-08 05:36:46 +00:00Commented Jun 8, 2013 at 5:36
-
My son is a college student interested in "maximizing his relaxation". I think that puts a filter on how I view some things :)HalR– HalR2013-06-08 05:39:06 +00:00Commented Jun 8, 2013 at 5:39
2 Answers
Create a command line app at the start, it may still generate some other things but it should give you what you want. You can also use xcode as solely a text editor and still get some of it's features
For that purpose don't use XCode.
Just create cpp file with text editor (GUI text editor or command line vi, vim, etc...)
And compile it
g++ mysource.cpp -o mysource.out
and run
./mysource.out
If you want to use some syntax highlighting you have to use more complex text editors or plugins. For debugging it's better to use XCode or any other IDE.
More features bring more performance drain.
You should try both options and decide which one to use.