Reputation: 11880
I'm on OS X Mavericks 10.9.3. When I run a long cpp
command, I get an opaque error:
clang: error: no such file or directory: 'c'
I've narrowed the error-generating command down to
cpp -I "."
cpp
to give me a more useful error message?To address a question in the comments
$ cpp --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.2.0
Thread model: posix
Upvotes: 0
Views: 7556
Reputation: 128
If the installation gives error about clang or clang++ ..then we need to find where clang and clang++ have been installed by using following command on Mac xcodebuild -find clang
The output will be
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
after this we need to softlink the Xcode or command line binari
ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang /usr/bin/
Upvotes: 0
Reputation: 11880
By trial & error, I found I can fix the error by removing the space after -I
cpp -I"."
I'm assuming this is a behavior difference between clang
cpp
and other versions.
I still would like to know a better way to track down these kind of errors.
Upvotes: 4