r/AskProgramming • • Aug 23 '26

C++ -> IDE -> g++ -> Linux Help me understand!!

I am trying to comprehend all of the moving parts in compiling a program. Here is my understanding:

C++ is the programming language that is written in the IDE, some IDEs have built in compilers

  1. Is g++ the bridge between the language and machine code?

  2. How do I use g++, is it something that you download onto your computer.

  3. Where does g++ send the code after, is this where Linux comes into play?

  4. What is Linux? It is an operating system, but what does that mean specifically, is it supposed to make your code unable in an application or just execute in the terminal?

Thankyou for any clarification you can provide :)

0 Upvotes

18 comments sorted by

View all comments

Show parent comment

1

u/frnzprf Aug 24 '26

Yeah, it's a copypasta, but that's exactly why OP might be confused. Are compilers an essential part of an OS or not? If software is distributed as source code, then it is.

Do I even really use GNU tools as a regular user that uses a browser, office software and games? As I understand, if you use bash instead of zsh or fish, that would be part of GNU. Even if you're a programmer, you might have nothing to do with GNU, if you're not using C/C++. (Don't take that as a fact, maybe GNU is more deeply ingrained into the OS than I think.)

I'm sure I should be grateful for the work of Stallman anyways, at least for GPL and the idea of free software in a time where everything gets subscription based and sends telemetry data back.

1

u/TheKiller36_real Aug 24 '26

Don't take that as a fact, maybe GNU is more deeply ingrained into the OS than I think.

unless you're on alpine, void or chimera (or something very obscure) you have I'd guess like 80-90% of your programs being linked to GNU libc and on most distros all your coreutils will be GNU too