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 6143703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:33:19+00:00 2026-05-23T18:33:19+00:00

Can I use gcc to compile C++ program? Is there any difference with using

  • 0

Can I use gcc to compile C++ program? Is there any difference with using g++ instead?

On an exisitng system, I type “man g++”, the system returns “no manual entry for g++”. But it has gcc installed. Is that possible to install g++ from existing gcc library directly; or I have to download g++ instead?

  • 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-05-23T18:33:20+00:00Added an answer on May 23, 2026 at 6:33 pm

    You can use gcc to compile C++ programs as long as you set the proper flags and/or use the right extensions on your source-files (i.e., use .cpp), but that’s only if the C++ development tools, such as libstdc++ have been installed … and that typically means that g++ is available as well. So if you don’t have the C++ development tools and libraries installed, then no, you’re not going to be able to compile C++ files, especially if you start using elements from the STL, etc.

    That being said, if you restricted your C++ source-code to a strict C-subset of the language, then I don’t see why it wouldn’t compile … but that would defeat the whole point of using C++ in the first place … it would just be a C file with a .cpp extension 🙂

    If you are on Linux, then installing g++ is fairly straight-forward. Simply search the repository for g++ using apt-get, yum, or some other package manager, and it should come up as a nice pre-compiled binary, along with all it’s dependencies. If you are on OSX, then it comes with the Xcode developer tools. If you are on Windows, then you can use MinGW-w64, and again, that comes as a pre-compiled binary for x86_64, or you could use the version that comes with Cygwin (you didn’t mention your platform, so it’s possible you could be running Cywin on Windows). For that, just use the Cygwin package manager again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What windows C IDE can I use that will use gcc to compile and
in my homework i must use this command to compile my program: gcc -o
Can I configure the VS.NET 2008 IDE to use gcc as a compiler?
Can I force the gcc to use a null canary or terminator canary, when
Is there an easy way (like a free program) that can covert c/c++ code
Is there a built in linux utility that I can use to test a
Is there any way to disable system() and exec() function in C/C++ and Pascal,
When I use gcc to compile C programs I usually use -g to get
i am a newbie to assembly and program in c (use GCC in Linux)
I'm trying to debug a Windows program compiled using MinGW's gcc that only ever

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.