Sort
Profile photo for Dima Korolev

UNIX-friendly environment is nice to have.


Ubuntu Linux is among the easiest ways to get there, but it certainly is not the only one.

Short of having a dedicated machine, options are:

UNIX-friendly environment is nice to have.


Ubuntu Linux is among the easiest ways to get there, but it certainly is not the only one.

Short of having a dedicated machine, options are:

  • Emulated environment.

    Cygwin or MSYS | MinGW are awesome for Windows.

  • A virtual machine with Linux.

    I used
    VirtualBox on Windows.
    Vagrant is great for Mac.

    Parallels is another decent option.

  • OSX is UNIX-like as well.

    I know plenty of people who use their Mac-s effectively as BSD machines and don't look back.

    Check out
    brew: The missing package manager for OS X.

  • Externally hosted Linux box.

    AWS can spawn a remote Linux box within minutes, and they have a free tier.


I myself have used options 1) and 2) above while back in Microsoft. Works fine.



Also, developing in Microsoft Visual Studio on Widows or in xCode on Mac is also a great way to sustain one's professional life.

One can be as great as a programmer within Windows or Mac worlds without being much exposed to the world of Linux/UNIX.

If you prefer to stick with Ideone.com though, it would be unproductive to have a locally accessible compatible setup.

Don't borrow from the bank if you own your home, do this instead (it's genius).
Profile photo for Khan Sadh Mostafa

On Windows systems, you can use Visual Studio (Express edition is probably free) - it comes with a (nearly) complete set of Microsoft development stack. You can use MinGW (easier to install) or Cygwin (better choice) environment to install GCC and other development tools on your Windows machine. MinGW and Cygwin gives you an array of Linux/UNIX feats on Windows machines. Most IDEs (other than Visu

On Windows systems, you can use Visual Studio (Express edition is probably free) - it comes with a (nearly) complete set of Microsoft development stack. You can use MinGW (easier to install) or Cygwin (better choice) environment to install GCC and other development tools on your Windows machine. MinGW and Cygwin gives you an array of Linux/UNIX feats on Windows machines. Most IDEs (other than Visual Studio) on Windows would need some form of MinGW or Cygwin installed on your system.

You can chose to use any UNIX system. You'll still need to install compiler...

Profile photo for Aaron Shbeeb

If you're running windows then there are still free compilers available. If you're used to gcc then I recommend installing Cygwin and enabling all of the development utilities that you might need.

Profile photo for Ferenc Valenta

“If the C language is system-independent, how do I use it on a PC without an operating system? Where would you "install" the compiler?”

The C language program needs to be compiled. Practical compilers are running on some desktop operating system and need a lot of stuff installed. Of course it’s also possible to create a compiler that’s running on the bare metal. An example is the Sharp PC-G850V calculator. It’s not a PC, it does not have any OS. It’s powered by a 8-bit Z80-clone CPU made by Sharp and has only 32 kilobytes of RAM. Some Psion PDA’s also had built-in C compiler, but I believe they

“If the C language is system-independent, how do I use it on a PC without an operating system? Where would you "install" the compiler?”

The C language program needs to be compiled. Practical compilers are running on some desktop operating system and need a lot of stuff installed. Of course it’s also possible to create a compiler that’s running on the bare metal. An example is the Sharp PC-G850V calculator. It’s not a PC, it does not have any OS. It’s powered by a 8-bit Z80-clone CPU made by Sharp and has only 32 kilobytes of RAM. Some Psion PDA’s also had built-in C compiler, but I believe they had something that qualified as an OS.

Of course, it’s much easier to compile bare-metal applications on a different, higher performance computer, and download the binary only. An example is the BIOS of the PC’s. It’s exactly what you asked for: an application running on the bare metal without any OS. There is no compiler built into the BIOS, and there is probably no compiler installed on the computer at all.

A compiled C program does not need any OS, virtual machine, runtime environment or libraries. Nothing is needed. And contrary to popular belief, even the C standard library is optional, and it’s very often not used.

Boost your efficiency with refactorings, code analysis, unit test support, and an integrated debugger.
Profile photo for Ken Gregg

It’s not easy.

You want to use a programming language implementation that doesn’t have garbage collection, that doesn’t require a separate runtime environment, and that interfaces easily with assembly language (which you’ll need to access processor-specific features not accessible from a high-level language). C++ certainly qualifies, but so do some others.

The first step is to define exactly what the requirements of the project are. This is one of the most challenging parts, to end up with a set of requirements that is complete, clear, and unambiguous.

You would need to understand how operating s

It’s not easy.

You want to use a programming language implementation that doesn’t have garbage collection, that doesn’t require a separate runtime environment, and that interfaces easily with assembly language (which you’ll need to access processor-specific features not accessible from a high-level language). C++ certainly qualifies, but so do some others.

The first step is to define exactly what the requirements of the project are. This is one of the most challenging parts, to end up with a set of requirements that is complete, clear, and unambiguous.

You would need to understand how operating systems work, how they are designed, what algorithms and data structures are appropriate, concurrency issues, etc. Of course, you would need to know the programming language(s) you’re using for implementation. You’ll very likely need to write at least a small amount of assembly language for each processor architecture you will support.

If compatibility with existing applications is important, you would need to fully understand and support the executable file formats, API functions, etc. needed for compatibility. If you’re going your own way on this, then you have to defined your own file formats, API functions, etc. and document everything, and then convince developers to develop applications for your new OS.

If compatibility with an existing OSs device driver model is important, you would need to fully understand and support the formats, APIs, protocols, etc. of the driver model. If you’re going your own way on this, then you would have to define and document all of this, and convince hardware vendors to write drivers compatible with your new OS.

Of course, you also need to develop a test plan and tests, to ensure quality. And you need to do performance testing and tuning.

A compiler is not really part of the OS. Yes, some OSs include one or more compilers, but the vast majority of OSs don’t ship with a compiler.

An OS like Windows, with tens of millions of lines of code, can take hundreds of person-years to develop and test, and the maintenance and enhancement is never-ending.

Now, if you scale back requirements, it’s not quite as daunting. A small, real-time OS for an embedded system, with not UI, might take only a few person-weeks or person-months to develop.

Profile photo for Vaclav Krpec

You didn’t understand what system-independent means. It doesn’t mean that you can program a machine with no OS directly in C.

It just means that the code can be compiled to produce a binary for any OS (and even no OS, directly executable by a CPU or a microcontroller). But you need to code it somewhere, using a text editor and then compile the code somewhere, using a compiler. Such processes (typically) run under some OS (although technically they don’t have to, either).

How do you do anything on a PC with no OS?

Profile photo for Fiverr

The best freelance digital marketers can be found on Fiverr. Their talented freelancers can provide full web creation, or anything Shopify on your budget and deadline. If you’re looking for someone who can do Magento, Fiverr has the freelancers qualified to do so. If you want to do Dropshipping, PHP, or, GTmetrix, Fiverr can help with that too. Any digital marketing help you need Fiverr has freelancers qualified to take the reins. What are you waiting for? Start today.

Profile photo for Joseph Stockman

You could use an online compiler like

https://www.onlinegdb.com/online_c++_compiler

and live with any limitations they present.

You could also use deployed containers (say docker compose) to download your source into the container which contains a compiler and everything related to compiler your code. This is common on CI/CD environments, so awesome for deployment but not so great for development.*

Similarly, a lot of corporate environments are set up so developers remote into a development environment and do all their work from there. Combined with other secure practices, this keeps intellection property u

You could use an online compiler like

https://www.onlinegdb.com/online_c++_compiler

and live with any limitations they present.

You could also use deployed containers (say docker compose) to download your source into the container which contains a compiler and everything related to compiler your code. This is common on CI/CD environments, so awesome for deployment but not so great for development.*

Similarly, a lot of corporate environments are set up so developers remote into a development environment and do all their work from there. Combined with other secure practices, this keeps intellection property under their control.

So there are ways to do it, but in my opinion, nothing beats local development tools.

*I do use docker compose locally as part of my local development and local CI/CD. But it is built into my IDEs and the containers are local, so that is not the same thing.

Profile photo for Alan Barker

Possible, yes. But I don’t know of any C++ compiler that runs on bare metal (compilation is not a useful bare-metal run-case) and it would have to be a special compiler with special run-time libraries designed to run on bare metal. In fact, the C++ run-time environment would have to provide most of the operating system facilities (how do you do “new <something>” with no O/S to allocate memory?). So it is possible, but very difficult, does not currently exist, and is not likely to exist.

C++ compilers generating code to run on bare metal probably *do* exist, but in most cases they will target a

Possible, yes. But I don’t know of any C++ compiler that runs on bare metal (compilation is not a useful bare-metal run-case) and it would have to be a special compiler with special run-time libraries designed to run on bare metal. In fact, the C++ run-time environment would have to provide most of the operating system facilities (how do you do “new <something>” with no O/S to allocate memory?). So it is possible, but very difficult, does not currently exist, and is not likely to exist.

C++ compilers generating code to run on bare metal probably *do* exist, but in most cases they will target a subset of C++. The compiler running on bare metal is not useful. Cross-compilation is much easier.

Where do I start?

I’m a huge financial nerd, and have spent an embarrassing amount of time talking to people about their money habits.

Here are the biggest mistakes people are making and how to fix them:

Not having a separate high interest savings account

Having a separate account allows you to see the results of all your hard work and keep your money separate so you're less tempted to spend it.

Plus with rates above 5.00%, the interest you can earn compared to most banks really adds up.

Here is a list of the top savings accounts available today. Deposit $5 before moving on because this is one of th

Where do I start?

I’m a huge financial nerd, and have spent an embarrassing amount of time talking to people about their money habits.

Here are the biggest mistakes people are making and how to fix them:

Not having a separate high interest savings account

Having a separate account allows you to see the results of all your hard work and keep your money separate so you're less tempted to spend it.

Plus with rates above 5.00%, the interest you can earn compared to most banks really adds up.

Here is a list of the top savings accounts available today. Deposit $5 before moving on because this is one of the biggest mistakes and easiest ones to fix.

Overpaying on car insurance

You’ve heard it a million times before, but the average American family still overspends by $417/year on car insurance.

If you’ve been with the same insurer for years, chances are you are one of them.

Pull up Coverage.com, a free site that will compare prices for you, answer the questions on the page, and it will show you how much you could be saving.

That’s it. You’ll likely be saving a bunch of money. Here’s a link to give it a try.

Consistently being in debt

If you’ve got $10K+ in debt (credit cards…medical bills…anything really) you could use a debt relief program and potentially reduce by over 20%.

Here’s how to see if you qualify:

Head over to this Debt Relief comparison website here, then simply answer the questions to see if you qualify.

It’s as simple as that. You’ll likely end up paying less than you owed before and you could be debt free in as little as 2 years.

Missing out on free money to invest

It’s no secret that millionaires love investing, but for the rest of us, it can seem out of reach.

Times have changed. There are a number of investing platforms that will give you a bonus to open an account and get started. All you have to do is open the account and invest at least $25, and you could get up to $1000 in bonus.

Pretty sweet deal right? Here is a link to some of the best options.

Having bad credit

A low credit score can come back to bite you in so many ways in the future.

From that next rental application to getting approved for any type of loan or credit card, if you have a bad history with credit, the good news is you can fix it.

Head over to BankRate.com and answer a few questions to see if you qualify. It only takes a few minutes and could save you from a major upset down the line.

How to get started

Hope this helps! Here are the links to get started:

Have a separate savings account
Stop overpaying for car insurance
Finally get out of debt
Start investing with a free bonus
Fix your credit

Profile photo for G Saunders

In the US, Red Hat Enterprise is probably the most sought-after certificate. You can get CentOS free, which is a community-supported version of RedHat, or get a supported version from Red Hat for $349.

Other places, Ubuntu or Suse are the ordinary server versions and they come with excellent commercial support. Some people like Slackware.

If you’re interested in programming for security reasons, Kali Linux has all the security tools built into it. Kali is the old BackTrack Linux ported into Ubuntu so it’s an easier install.

Depending on the platform you’re working with, other Linux flavors might

In the US, Red Hat Enterprise is probably the most sought-after certificate. You can get CentOS free, which is a community-supported version of RedHat, or get a supported version from Red Hat for $349.

Other places, Ubuntu or Suse are the ordinary server versions and they come with excellent commercial support. Some people like Slackware.

If you’re interested in programming for security reasons, Kali Linux has all the security tools built into it. Kali is the old BackTrack Linux ported into Ubuntu so it’s an easier install.

Depending on the platform you’re working with, other Linux flavors might be the best. I had a job with a wearable computer some time ago and White Dwarf Linux was what was customized for the PC104 single-board computer.

If it’s a Raspberry Pi, Raspbian aka Raspberry Pi OS is good, but other distros are stripped down for it. The Pi is pretty much a ‘full computer’ and can load and run most any OS that’s prepared for it, even Windows.

If you’re wanting to program embedded systems, you’ll probably plug it into a computer running the Arduino IDE. Some other single-board computers have an OS, usually a stripped-down Linux from one of the major distros. Although an Arduino or other single-bard computer _can_ run an OS, it’s usually configured to run one program at a time and doesn’t need a full OS.

I did a project for IBM some years back with Macs and MacBooks when they used IBM Power CPUs. Yellow Dog Linux was the best for that, which also ran fine on the IBM i5 server they gave me for the project. I introduced IBM to Red Hat soon after that and Red Hat came out with distros for IBM zSeries mainframes and pSeries servers. Recently, IBM bought Red Hat and uses it for their Linux One mainframes along with Ubuntu and Suse.

These days, I mostly stick to CentOS on the several virtual servers I tend. I like it because it’s familiar to me, and I don’t need to go looking stuff up. After decades of tending to System V compliant unices, Red Hat is what I know best. If I get into an Ubuntu or BSD unix situation, or AIX on an IBM pSeries, I can probably work in it, but I need to look up where stuff is, where stuff is logged, and what switches to use on commands. Sometimes something like a ‘-B’ means one thing in one ‘dialect’ of unix or Linux and the opposite in another.

I encourage my students, who will be looking for jobs in the US, to put up a CentOS server and get to work on the RHCE. It’s good to put Kali Linux on a notebook so they can carry it around and work, ethically, on Security+, CEH+, or PenTest+ certs, exploring networks wherever they are. And, I think it’s good to put Ubuntu on a desktop or notebook so they can see the best Linux for personal use.

If you check out Linux distribution - Wikipedia you’ll see hundreds of distros based off the major distributions of Debian, Red Hat, and Slackware. There are also a couple dozen that use Linux but aren’t based on the major distros. To all these, add iOS and Mac OSX, which have huge market share and are based on BSD unix, which Steve Jobs worked with while he was away from Apple, not Linux.

There is no one ‘best Linux’, and there are probably a couple or few that are best for what you want to do.

Profile photo for Renny Koshy

Short answer: Yes

Long answer: It’s somewhat involved…

  1. You need to make sure your code is cross-platform because each OS provides different services. One option is to use a cross-platform toolkit (like Qt, JUCE, boost, Pico) to deal with platform level differences
  2. Use a cross platform build tool — CMake works well for us across Linux, Mac, Windows
  3. You will have to add at least some level of preprocessor directives to deal with nuances.
  4. Packaging (setup process/distribution) is VERY different on each OS. We use a CI build chain to compile and package things. RPM’s for Linux, MSI and EXE installers f

Short answer: Yes

Long answer: It’s somewhat involved…

  1. You need to make sure your code is cross-platform because each OS provides different services. One option is to use a cross-platform toolkit (like Qt, JUCE, boost, Pico) to deal with platform level differences
  2. Use a cross platform build tool — CMake works well for us across Linux, Mac, Windows
  3. You will have to add at least some level of preprocessor directives to deal with nuances.
  4. Packaging (setup process/distribution) is VERY different on each OS. We use a CI build chain to compile and package things. RPM’s for Linux, MSI and EXE installers for Windows, and PKG file for Mac.
Profile photo for Anonymous
Anonymous

To learn more about linux, you pretty much need to install Slackware Linux yourself. Or Linux From Scratch. Install them from scratch, configure everything, and read the docs. That will greatly improve your linux skills, because you'll know how things work under the hood.

However, knowing Linux OS will not make you better C++ programmer, because good portion of its software is written in other languages. Kernel is in C, for example, and C++ is not primary language on linux OS. I would say that C is more likely candidate to be a "primary" linux programming language.

The good thing is that you'll

To learn more about linux, you pretty much need to install Slackware Linux yourself. Or Linux From Scratch. Install them from scratch, configure everything, and read the docs. That will greatly improve your linux skills, because you'll know how things work under the hood.

However, knowing Linux OS will not make you better C++ programmer, because good portion of its software is written in other languages. Kernel is in C, for example, and C++ is not primary language on linux OS. I would say that C is more likely candidate to be a "primary" linux programming language.

The good thing is that you'll get access to proper llvm-clang compiler without using any kind of voodoo, which means bleeding edge support for C++ features. But that's pretty much it.

In order to become better C++ programmer it would make sense to learn to write in platform-independent fashion, using whatever framework you prefer. Qt, boost, GTK, or anything else - instead of concentrating on Linux. Qt in particular has fairly clean code that is worth studying.

Profile photo for Miles Fidelman

What are you installing, and how? (You say tools and libraries, not code that you’re writing yourself - what tools & libraries?)

For standard tools and libraries, the general approach is to install the packages using your distribution’s package manager - no compiling involved. (And an awful lot of tools get installed automatically, based on what choices you make during your Linux install.)

If you’re downloading and installing from source code, then it’s usually a matter of unziping and untaring the file into /usr/local/src, cd into the directory, then

./configure; make; make check; make install

Pa

What are you installing, and how? (You say tools and libraries, not code that you’re writing yourself - what tools & libraries?)

For standard tools and libraries, the general approach is to install the packages using your distribution’s package manager - no compiling involved. (And an awful lot of tools get installed automatically, based on what choices you make during your Linux install.)

If you’re downloading and installing from source code, then it’s usually a matter of unziping and untaring the file into /usr/local/src, cd into the directory, then

./configure; make; make check; make install

Particularly for tools, there’s a good chance that you need to be root (su or sudo), or create an account and filesystem specific to the tool (though that’s more common for servers). MAKE SURE TO READ THE README AND INSTALL FILES.

Another possibility is that ./configure fails to find necessary dependencies. Again, BE SURE TO READ THE README AND INSTALL FILES.

Now, if you’re having problems compiling your own source code, then you need to look at the errors that the compiler is spitting out - chances are you have syntax or dependency issues, or you need to pay attention to the options you’re passing to the compiler.

Profile photo for Mayank Bhura

Remove the line:
std::ios::sync_with_stdio(false);
It will work fine.

You have another alternative:

instead of:
scanf("%lu",&i); scanf("%lu",&j);
do:
cin>>i>>j;

This will also work with std::ios::sync_with_stdio(false).

By default, C++ and C output streams are synchronized. If you do std::ios::sync_with_stdio(false), both of them run independently.
Because of this, there may be some input which cin might read while scanf will skip. Same for cout and printf statements.

Thus, the output which should have been produced, didnt get produced because:

I added a line below: scanf("%lu",&i); scanf("%lu",&j)

Remove the line:
std::ios::sync_with_stdio(false);
It will work fine.

You have another alternative:

instead of:
scanf("%lu",&i); scanf("%lu",&j);
do:
cin>>i>>j;

This will also work with std::ios::sync_with_stdio(false).

By default, C++ and C output streams are synchronized. If you do std::ios::sync_with_stdio(false), both of them run independently.
Because of this, there may be some input which cin might read while scanf will skip. Same for cout and printf statements.

Thus, the output which should have been produced, didnt get produced because:

I added a line below: scanf("%lu",&i); scanf("%lu",&j);
as printf("%lu %lu\n",i,j);

It gave output "0 0". Because your i and j were initialized to 0 and 0 respectively.
This means that scanf didn't even read your inputs.

These kind of unexpected problems arise often when we use C++ streams in conjunction with C streams, if the flag for sync_with_stdio is set to false.
So whenever you use both, make sure you dont set it to false. This will often lead to unexpected outputs.

So in case of your Windows platform, I think the OS might have overruled and not allowed the synchronization, even though you set it to false. In case of Ideone, it runs on Linux platform, where the threads are allowed to run independently.

Hope you got your answer. :)

Profile photo for Michael Bauers

I download Microsoft Community Edition and use that.

Admittedly, a learning curve if you have never used it. Once it’s installed, you can create a new project. Search in the template box for C++. Choose console app, and it will create a single file for you.

control-B builds

F5 runs it

Profile photo for Andrew McGregor

On what OS with which compiler?

More details, or it's impossible to write a decent answer.

Profile photo for Michael Mossman

There are many different types of package management systems used in GNU/Linux, but here I will refer to .deb, which is what I have had experience with :

In this case especially, the answer to your question is Yes, but obviously the installer files need to be available (offline) first. In the case of .deb based package management, when using command-line (apt/apt-get) or Synaptic (gui based) programs, those .deb, files are stored at /var/cache/apt/archives. If you have previously installed a program, then removed it & now change your mind, assuming said cache hasn’t been cleared & the .deb is s

There are many different types of package management systems used in GNU/Linux, but here I will refer to .deb, which is what I have had experience with :

In this case especially, the answer to your question is Yes, but obviously the installer files need to be available (offline) first. In the case of .deb based package management, when using command-line (apt/apt-get) or Synaptic (gui based) programs, those .deb, files are stored at /var/cache/apt/archives. If you have previously installed a program, then removed it & now change your mind, assuming said cache hasn’t been cleared & the .deb is still the current version, you can install that program again without the need to download anything at all. This can also apply to a whole bunch of programs if you like, as long as all dependencies are also met (other .debs). I’m not sure what your end goal is, but I can give you a scenario where I sometimes do this : I am a self-confessed distro-hopper … I like trying new distros. I often do it on bare-metal, on a separate partition, after first trying said distro in a VM. If (after installing the distro properly) I then decide that I also want to install my favorite programs, I can symlink my /var/cache/apt/archives folder to my main distro’s cache (same version). Wala … all the .deb files I need to install my fave software are already there, and its job-done in seconds =)

Profile photo for Pawel Kraszewski
  • You (obviously) have no interest in using Parrot OS. Despite parrot’s hype, it is not intended for absolute beginner users of Linux. Use one of general purpose distributions for beginners: Ubuntu, Mint, MX, Elementary.
  • Dev-C++ is a wobbly attempt to use Linux compilers in Windows. Using it on Linux is a pure nonsense, as all the tools are already there. Plus it is hugely outdated.
  • If you need an IDE for C or C++ on Linux, use QtCreator, Code::Blocks or (as a last resort) VsCode. Code::Blocks has the same shitty 2000’s GUI vibe as DevC++, so you might want to pick that.
Profile photo for David Townsend

That’s not what system-independent means. The C language is defined by a standard which is indepedent of the underlying hardware, so a C program can be compiled and executed on a PC, a mainframe, small cellphone processors or a 8-bit washing machine controller.

Profile photo for Kristophorus Hadiono

The Dev-C++ IDE? If this is what you meant. Then the answer is yes, but, you must use wine to be able to do that.

The other way around is you can use any C/C++ IDE which available in Linux such as Code::Block, or any other C/C++ IDE which available in your Linux distribution. Just find it in your Linux distribution application repository.

Profile photo for Rundoo

Use command line interface. For example, on Linux, write this program and save it to file x.c:

  1. #include <stdio.h> 
  2. void main () { 
  3. printf ("Hello world!\n"); 
  4. }  

The compile it from command line:

  1. gcc -o x x.c 

And then execute it:

  1. ./x 
  2. Hello world! 

This is probably the simplest C program. From here, you can continue adding functionality, and using Makefile to compile only the source code that has changed.

Profile photo for Dr. Yehuda Singer

The IDE is just activating the compiler to run as a separate process of the operating system.; hence the performance of the compiler remain as it were invoked from the command line.

The IDE is necessary to develop and maintain the files associated with the project. All IDEs use a make file which determines the compilation dependencies to avoid compiling the whole project.

Profile photo for Davide Cannizzo

Online compilers actually run in the servers, and offer realtime communication for the standard input/output/error of the process of the generated binary. The program you compile runs in the servers of the online compiler. So, both performance of the compiler itself and of the execution of the program will depend on the server. Note that input/output/error streams may be additionally delayed due to the realtime communication established with the online compiler servers.

Profile photo for Richard Conto

You’re probably running into one or more of the following problems:

  1. Failing to install dependencies
  2. Having the wrong VERSION of dependencies

Some Linux distributions contain two different kinds packages - run-time support, and development support. If you’re building software, you’ll need the development support (which typically brings along the runtime support.)

But the thing about Linux distributions is that for any “version” of the distribution, they typically organize most of the packages around a few versions of some basic packages (such as compilers, scripting languages, and other “tool chain

You’re probably running into one or more of the following problems:

  1. Failing to install dependencies
  2. Having the wrong VERSION of dependencies

Some Linux distributions contain two different kinds packages - run-time support, and development support. If you’re building software, you’ll need the development support (which typically brings along the runtime support.)

But the thing about Linux distributions is that for any “version” of the distribution, they typically organize most of the packages around a few versions of some basic packages (such as compilers, scripting languages, and other “tool chains”.) They might make local patches to these tool chains, but they seldom run with the most recent version of these packages.

Which means that if you NEED a particular version of a package where that version isn’t supported by your distribution, you’ll end up building that package and installing it so it doesn’t conflict with the distribution version. (And building all of IT’S dependencies.)

Some packages are very poorly documented as to what their dependencies are as well.

Because I’m familiar with FreeBSD’s “ports” system, I take advantage of how they include dependencies so that ports can be built from source.

Resolving dependencies like this is a rat’s nest. You really want to avoid it if you can.

Because resolving dependencies like this can involve uninstalling and reinstalling various different packages with different build options, I use “radmind” to manage this - but “radmind” is it’s own kind of nightmare (just one I’m familiar with.)

Profile photo for Reini Urban

There’s no such thing as a lightweight C++ compiler for small systems.

  • If you mean fast compile-times, you want clang++. (35kB + gcc)
  • If you mean with best support and least hazzles, you want g++. (25Kb + clang)
  • On small ARM devices Embarcadero might be a good option: C++ Compiler: Free Download (= Borland/Turbo C++)
  • The OpenWatcom and the Symantec C++ compilers fell out of favor
  • Intel C++ has also nice support for 32bit, Intel HW only. (1Gb)
  • MSVC++ comes in some free flavors, but is certainly not recommended for “lightweight”, as it comes with a mandatory UI.
  • The old CERN CINT C++ interpreter was ve

There’s no such thing as a lightweight C++ compiler for small systems.

  • If you mean fast compile-times, you want clang++. (35kB + gcc)
  • If you mean with best support and least hazzles, you want g++. (25Kb + clang)
  • On small ARM devices Embarcadero might be a good option: C++ Compiler: Free Download (= Borland/Turbo C++)
  • The OpenWatcom and the Symantec C++ compilers fell out of favor
  • Intel C++ has also nice support for 32bit, Intel HW only. (1Gb)
  • MSVC++ comes in some free flavors, but is certainly not recommended for “lightweight”, as it comes with a mandatory UI.
  • The old CERN CINT C++ interpreter was very lightweight, but a very strange thing with ~85% dynamic C++ CINT : C++ interpreter

There are a few more esoteric ones listed at List of compilers - Wikipedia with which I had not much success with. For the really small devices you cross-compile it on a big system.

Profile photo for Kilian Hekhuis

That depends on how it is implemented. Generally speaking, the IDE will run inside your browser as a JavaScript program, and the compiler will run on a server. So the IDE’s performance depends on your local CPU, and the compiler performance will not. However, a typical IDE doesn’t use that much CPU power, so even a low-end laptop should be able to run it.

Profile photo for Avishek Sharma

Well, you can install Codeblocks which is very good and easy to use. You should be running the latest version of Lubuntu to get it done via the Terminal itself. Else the installation is a messy one.

I still recommend using the terminal G++ compiler(a better one) for dedicated c++ programming at full flegde.

Profile photo for Peter Schaeffer

The general answer is no. In my experience, when you install the IDE you automatically get the compiler. I have extensive practical experience with VSCE (Visual Studio Community Edition – the free version) and Eclipse (also free). In both cases, I was using the C/C++ compiler. In both cases, the C/C++ compiler just worked after I installed the software (VSCE or Eclipse).

Note that I have said similar experiences with Python, PHP, and JavaScript. Of course, those are not really compiled languages.

There may be exceptions to this statement (that the compiler comes with the IDE). However, I have no

The general answer is no. In my experience, when you install the IDE you automatically get the compiler. I have extensive practical experience with VSCE (Visual Studio Community Edition – the free version) and Eclipse (also free). In both cases, I was using the C/C++ compiler. In both cases, the C/C++ compiler just worked after I installed the software (VSCE or Eclipse).

Note that I have said similar experiences with Python, PHP, and JavaScript. Of course, those are not really compiled languages.

There may be exceptions to this statement (that the compiler comes with the IDE). However, I have not found them.

Profile photo for Jon R

Very hard, I don't know exact numbers but would guess the number of people involved in creating windows 10 would number in their hundreds if not thousands. Can you even begin to imagine how difficult it it to manage a workforce that large. And then there is the hardware. Windows runs on machines with a huge variety of hardware, MS can get the manufacturers to write drivers because windows sells millions of copies so it is in the manufacturers interest to do so, less so if you are writing an OS from scratch with zero users.

Profile photo for David Vandevoorde

I’m not sure what you mean by “lightweight”. If it refers to the footprint of the installation, then I suspect something based on the EDG compiler (which is what I work on) could be interesting. A full-featured C++17 compiler (without a library) can probably be built in with just a few (maybe 5?) megabytes of space. However, it’s not an out-of-the-box experience (we sell source code; not executables).

For alternatives, I’d need to have more insights into constraints (OS, C++ features needed, etc.).

Profile photo for Anthony Hawken

This very much depends on what type of environment you are using.

If you are using the Quincy 2005 IDE.

You do the following from the Project pop-down menu

  1. click on compile
  2. click on build
  3. click on execute
Profile photo for John Allard

It really shouldn't matter that much, I would suggest that you try out a few different ones and pick the one you like. I personally started with Ubuntu (12.04 I think?), then moved onto Kubuntu because KDE is nice and it's installed by default in Kubuntu. A year ago I moved over to Arch Linux and it's by far my favorite. If you want something that works 'out-of-the-box' and is a bit cooler than default Ubuntu I would give Linux Mint a try. Here are a few things you want to consider when choosing a distro

1. How much set-up work do you want to do? With something like Ubuntu, these days it's as e

It really shouldn't matter that much, I would suggest that you try out a few different ones and pick the one you like. I personally started with Ubuntu (12.04 I think?), then moved onto Kubuntu because KDE is nice and it's installed by default in Kubuntu. A year ago I moved over to Arch Linux and it's by far my favorite. If you want something that works 'out-of-the-box' and is a bit cooler than default Ubuntu I would give Linux Mint a try. Here are a few things you want to consider when choosing a distro

1. How much set-up work do you want to do? With something like Ubuntu, these days it's as easy if not easier to install and get running than Windows. If you want a challenge and something with less bloat by default, you might want to lean towards Arch.

2. What package manager do you want to use? This is important but often overlooked. I personally love pacman, but it's just a personal preference.

3. What's the default Desktop Environment? You can always swap out DE's, but it's probably easier to pick a distro that has the DE you want pre-installed (or no DE installed like Arch). If you want something lightweight, you might want to look into XFCE or LXDE. If you want something more exotic, try a tiling window manager like i3 or bspwm. DE's like KDE and Unity are nice but large and full of bloat.

But, once again, the fact that you love C/C++ shouldn't really affect you choice of distribution. If you want bleeding edge features then you probably don't want to go with something like Debian Stable, but even then you could find ways to get support for C++14/17, etc.

Profile photo for Garry Taylor

Installing Xcode will give you all the compilers and libraries you need, plus the IDE.

Xcode isn’t all that great though, personally for C++ I’d get CLion.

Profile photo for Quora User

Yes. The point is that you’d need to provide the package to your package manager so that it can install the package (i.e. program) on your system. So rater than reach out to the repos that are configured on your system (which you wouldn’t be able to do if your system is offline), you would install a package from file(s) on your system. On a RedHat system, you can use rpm (redhat package manager) to install .rpm files. That, however, will not automatically handle package dependency issues. But it can meet the requirements of your question.

About · Careers · Privacy · Terms · Contact · Languages · Your Ad Choices · Press ·
© Quora, Inc. 2025