Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode install on OSX 10.9 - clang: error: no input files

Tags:

gcc

clang

I'm in the process of installing XCode Command Line Tools onto OSX 10.9 Mavericks

I did a successful install XCode:

$ xcode-select -p 
/Library/Developer/CommandLineTools 

However when I type in either $ clang or $ gcc it returns:

clang: error: no input files 
like image 486
user2925321 Avatar asked Oct 27 '13 15:10

user2925321


3 Answers

I faced the same issue. Type in xcode-select --install. It will work.

like image 28
Gautam Jain Avatar answered Oct 23 '22 01:10

Gautam Jain


If you just type the command without any input files, then as commented, the compiler reports an accurate error message.

But if you have an existing project, then you can see that same "clang: error: no input files" message when:

  • you move your folder/files after making the project
  • one of your files isn't recognized by the XCode project
  • your project pre-compile header settings is wrong (wrong prefix):

    In Xcode "Build settings" reviews the value for "Prefix header".
    It seems to me that you have it set to "MySecondTabbApp/MySecondTabbApp-Prefix.pch" and it should be just "MySecondTabbApp-Prefix.pch"


The OP user2925321 comments:

The error was that I was running through steps to configure ruby and was directed to instructions on another page that just stated to check for $ gcc instead of $ gcc --version.
Obviously new to coding, trying to learn more.

like image 157
VonC Avatar answered Oct 22 '22 23:10

VonC


Try gcc -v. I am on a Mac (Mavericks) and that worked for me. It will tell you which version you are using (and you will know it is installed).

like image 8
Christy Byrne Avatar answered Oct 23 '22 01:10

Christy Byrne