Reputation: 1
Before moving on to question, I'm 100% newbie to programming and I'm on my own. So please answer my question even though you think it seems very silly.
Somehow I manage to install command line tools successfully:
LazyRen:~ LazyRen$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
LazyRen:~ LazyRen$ xcode-select --install
xcode-select: note: install requested for command line developer tools
LazyRen:~ LazyRen$ gcc
clang: error: no input files
But the problem is when I tried to build the most basic codes with ST3 it gives me
clang: error: no input files
[Finished in 0.0s with exit code 1]
[cmd: ['gcc', 'Hello C World!', '-o', 'Hello C World!']]
[dir: /Users/LazyRen/Library/Application Support/Sublime Text 3/Packages/User]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
This. I just have no idea what kind of input file is needed. Any hints?
Upvotes: 0
Views: 607
Reputation: 53010
You appear to be lost inside ST3. As you have Xcode why not use it instead? To run a command line "Hello World" C program do the following:
Now continue with your C textbook. Also look at the Xcode documentation. In the latter you will find out how to locate the code you just compiled on the disc to you can run it from Terminal if you wish.
HTH
Upvotes: 1