Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8186121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:05:08+00:00 2026-06-07T02:05:08+00:00

When I try to compile a c++ program in my Mac terminal, I get

  • 0

When I try to compile a c++ program in my Mac terminal, I get the following error:

-bash: g++: command not found

but I believe I have all the files I need on my Mac to run the compiler. I have the Developer folder, which contains Xcode in Applications, g++ in the usr/bin folder, and a bunch of other folders.

How can I use these files to install the g++ compiler. Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:05:11+00:00Added an answer on June 7, 2026 at 2:05 am

    houbysoft’s answer above is correct, but the OP needs a little more detail.

    The basic idea is that you need the “Command Line Tools” environment installed. But the name for that environment, and how you install it, has changed multiple times over the years. So, houbysoft’s steps work for 4.3.3, but not for 3.2.6.

    In the 3.2 era, the tools were called “UNIX Development”. And, rather than being downloaded and installed from within Xcode, they came as part of the Xcode mpkg and were installed as part of the initial Xcode install. In most versions, there was a checkbox named “UNIX Development”, usually checked by default, but in some versions it was a separate step. Looking at the “Xcode 3.2.6 and IOS SDK 4.3” disk image currently available from Apple, it’s a checkbox. Anyway, that’s the only officially-supported way to get them, but lots of other ways work… Here are your options:

    • Throw away Xcode 3.2.6 (just trash the whole /Developer) and install 4.3.3, then follow houbysoft’s steps to get the Command Line Tools. Unless there’s a good reason you can’t use 4.3, this is almost certainly the best answer.
    • Throw away Xcode 3.2.6 and reinstall it, and this time make sure the “UNIX Development” checkbox is on.
    • Just re-run the 3.2.6 installer, and make sure the “UNIX Development” checkbox is on.
    • Log into developer.apple.com and look through the downloads for a package named “UNIX Development Tools”, “Developer Tools CLI”, “CLI Developer Environment”, “Command Line Tools”, or similar that corresponds to 3.2.6. There is such a package for most, but not all, versions of Xcode, and can be used to set up a command-line build environment either with or without Xcode.
    • Look at the invisible packages on the Xcode disk image. I don’t remember whether you need just DeveloperToolsCLI.pkg, or that plus a few others, but a bit of trial and error or googling should get you there.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I try to compile my program, I get the following error: main.cpp: In
When I try to compile my program I get these errors: btio.c:19: error: ‘O_RDWR’
When I try to compile this program , I get an unreachable statement error
Some I have this error when I try to compile a program in C.
When I try to compile my program on ubuntu using gcc, i get these
I receiving a undefined reference error when try to compile an c++ program. I'm
I have Simple java program named MainController.java. Wehn I try to compile it from
My program compiles fine, but crashes everytime throw (not inside of a try...catch block)
I had installed the package libtcmalloc-minimal0 but when I try to compile my program
I'm getting this error when I try and compile my program on my school's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.