How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Martin Your Own Question

Martin, Physicist
Category: Homework
Satisfied Customers: 781
Experience:  20+ years of research, engineering and teaching
Type Your Homework Question Here...
Martin is online now
A new question is answered every 9 seconds

Using a MacBook, OSX 10.8.x, and need to start using the C

This answer was rated:

Using a MacBook, OSX 10.8.x, and need to start using the C Compiler, which is gcc. I've downloaded XCode, and installed the gcc compiler. I've located a symbolic link to the gcc in /Applications/
However, when I CD to that location, I receive a "not a file" notification when the gcc command is issued.
Two things are needed:
1. What needs to be done so that I can compile?
2. How can I "shorten" the long names, so that they'll fit into a shell? In addition to compiling programs, I'll need to run them.
Pointing me to a book is also a satisfactory answer.

3. I'm experienced with BAT files in Windows, and have started with OSX shell commands, and have some that are working, but I don't know how to transfer those concepts to OSX.

You need to spend $3 to view this post. Add Funds to your account and buy credits.
Martin, Physicist
Category: Homework
Satisfied Customers: 781
Experience: 20+ years of research, engineering and teaching
Martin and 3 other Homework Specialists are ready to help you
Customer: replied 3 years ago.

Hi, Martin,


No way for you to know, but this wasn't homework. I've used C, over the years, but never on a Mac.

When the "which" command is entered, it shows NOTHING! It just goes to the next line.


As you can tell, I'm still finding my way around the Mac; I've written lots of code in many different languages, and lots of work in MS Office and now also learning LibreOffice.


I have installed the gcc from XCode. Need I do it again?

And what is the output from

$ env | grep PATH
Customer: replied 3 years ago.

PATH=/Users/LeonStevens2/Library/Application Support/GoodSync:/Users/lstevens0411/Library/Application Support/GoodSync:/Users/lstevens0411/Library/Application Support/GoodSync:/Library/Frameworks/Python.framework/Versions/3.3/bin:/Users/lstevens0411/Library/Application Support/GoodSync:/Users/lstevens0411/Library/Application Support/GoodSync:/Library/Frameworks/Python.framework/Versions/3.2/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Applications/

This looks fine. I would expect gcc to be in /usr/bin. Can you verify that it is not there?

Another thing that concerns me is that if gcc does not exist in your PATH directories, then you should get the following result

$ gcc
bash: gcc: command not found

What exactly do you get when you execute a bare "gcc" at the command line?
Customer: replied 3 years ago.

Just did an ls /usr/bin and there is no gcc there.

When I execute a gcc command, I do receive bash: gcc: command not found

OK, we need to find it. If it's not there, we'll need to install it. Try:

$ find / -name gcc 2>/dev/null

This will run for quite a while, but after thirty seconds or so you'll have your results and can kill it with "<cntrl> c".
Customer: replied 3 years ago.



It ran, and completed in about 20 seconds.

When I posted it here, the reply was denied.


I have the answer, it is about a terminal screen full.


What should I do?

Customer: replied 3 years ago.

Martin, I'll have to leave in about 20 minutes, so when I don't respond, it's because I left.



You could paste it into a word doc and upload it here. Here are instructions.
Customer: replied 3 years ago.

This is a note.

Got it, thanks.

Based on this, I think what might be needed is the Xcode command line tools.

1) Start Xcode
2) Select Preferences from the Xcode menu
3) Click on the Downloads tab
4) Install "Command Line Tools".

Restart, and see if that helps.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Previous | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX

Meet The Experts:

  • LogicPro



    Satisfied Customers:

    Expert in Java C++ C C# VB Javascript Design SQL HTML
< Last | Next >
  • LogicPro's Avatar



    Satisfied Customers:

    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany


    Satisfied Customers:

    More than 5000 online tutoring sessions.
  • Linda_us's Avatar


    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    Post Graduate Diploma in Management (MBA)
  • Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    Experience with chartered accountancy
  • Bizhelp's Avatar



    Satisfied Customers:

    Bachelors Degree and CPA with Accounting work experience
  • Seanna's Avatar



    Satisfied Customers:

    3,000+ satisfied customers, all topics, A+ work

Related Homework Questions