Is it installed? When I search gcc through spotlight I see a gcc (MacOSX.10.5.sdk). I assumed that it was installed automatically with the upgrade. I did install Xcode before I ever started compiling perhaps gcc is included with that?
I searched for gcc 10.6 on apple.com and found nothing.
When I compile it is from within the directory of the file I am trying to compile.
I just tried "which g++" and it seemed to work but when I tried to run the program after
which g++ xxx.cpp -o xxx
./xxx
(No such file or directory).
mschott21, please post the answer to the following commands (go to the directory with your cpp file):
1) g++
2) g++ -c xxx.cpp
3) g++ -o executable.out xxx.o
4) ./executable.out
I have Debian linux and my outputs are like soȘ
1) g++: no input files
2) nothing
3) nothing
4) the output of my program.
1. command not found
2. command not found
3. command not found
4. does not exist
Is there an updated version of gcc that I need to install? If so I can't find it on developer.apple.com unless its in the Xcode 4 package which costs $$$. I am stuck.
I'm glad you got your program working.
In linux, witch command returns the path to the executable, maybe try to check if the path console variable is set corectly. In bash I would do " echo $PATH$".
I thought it was working but I really was just running the executable file i created before. I really don't know how to create an executable now. I'll try to check the path but I don't know how to fix anything and I am not confident in my ability to recognize an error.