1

I am working on Xcode 5.0,i copied JSON library files in to my project which are built with non arc, so i added complier flag "fno-objc-arc"for those JSON library compiler sources. After doing this i am getting apple LLVM 5.o error.

clang: error: no such file or directory: 'fno-objc-arc'
Command    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

Pleas help me to resolve this error.

paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
Madhu
  • 994
  • 1
  • 12
  • 33

2 Answers2

6

If that's a command line option, and it is, you need to prefix it with a hyphen, such as with:

clang -fno-objc-arc ...

If you just use fno-objc-arc, it's going to think it's a file name you want compiled, and complain bitterly that no such file exists, as indeed it seems to be doing with the no such file or directory: 'fno-objc-arc' error.

Community
  • 1
  • 1
paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
  • I'm getting error 'clang: error: no such file or directory: 'clang''. I'm working on Xcode 6.4. – Jayprakash Dubey Sep 01 '15 at 12:32
  • @JayprakashDubey, you should post a question so it gets more eyeballs on it but it *looks* like you might have the command line `clang clang something` (i.e., duplicate `clang`). That'd be my first guess but, as stated, a question will get you more exposure and probably better answers, even if they *are* still guesses :-) – paxdiablo Sep 02 '15 at 01:07
0

Please note that there is no new line character after -fno-objc-arc. You can be assured by entering -fno-objc-arc and click somewhere around instead of hitting enter/return key.

This got my problem fixed!

Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
  • This is not an answer to the question asked. It appears to be an answer to a different question only tangentially related, and one that you never bothered to ask save as a comment to another answer. – paxdiablo Sep 02 '15 at 05:37