ld: can't open output file for writing: a.out, errno=13 for architecture x86_64
While compiling a simple C programme, just to test the gcc compiler that comes with Xcode 4.1, I encountered the following error.
ld: can't open output file for writing: a.out, errno=13 for architecture x86_64
This got resolved by doing the following.
sudo bash
export ARCHFLAGS='-arch i386 -arch x86_64'
Then recompiling the code from within bash.
It appears that Xcode 4.x does no longer support non x86_64 architectures by default. Can somebody clearly explain this problem?
Xcode 4.2-OTHER, Mac OS X (10.7.1), Mac OS X (10.7.2)