I have the following files on a linux VM:
gc.h
gc.c
test.c
test.out
I run the command in terminal:
gcc -g test.c gc.c gc.h -o test.out
Everything compiles. I then run the same files (I copied them over) and run the command on my OSX terminal:
gcc -g test.c gc.c gc.h -o test.out
I then get the following error:
clang: error: cannot specify -o when generating multiple output files
Is there a simple reason why I am getting this error? I don't understand as I am not generating multiple files? I also googled this, but couldn't find anything relevant.
I have appreciated your clues. I get now that it has to do with the fact that I am running OSX 10.9 Mavericks and xcode 5.0.2. So now I am in the process of trying to switch over to gcc48. So I thought doing it would be easiest with brew install gcc48
. I just did a major update with brew last week and I saw this message:
Error: No available formula for gcc48
Searching taps...
homebrew/versions/gcc48
Anyone see this before? I am somewhat not very experienced with the brew tool. What does this mean? Yes, I googled this, but just don't seem to have a lot of luck today. Then, I found this Homebrew install specific version of formula? and I think I got it working. But not quite sure why the normal command wouldn't work as intended?