Question:
best OS for programming C/C++?
Henok Y
2010-07-30 04:21:16 UTC
Hi,
I'm on my way to take C/C++ courses. So the school suggests Unix as the development platform. So which unix OS should I install on my computer, one that is free and open source is very in demand.
- As far as i understand Linux is not a Unix-system, it's a Unix-like as it doesn't fulfil the Unix single specifications (Or is itn't?). So is Linux (especially Ubuntu) a good or better OS for C/C++ programming? THANKS IN ADVANCE!
Six answers:
Cubbi
2010-07-30 05:49:46 UTC
The most important thing to keep in mind is that C++ and, to a lesser degree, C programming should never make assumptions about the OS. These languages were created to be portable, and a program that compiles and runs on Linux must compile and run and exhibit the same behavior on IRIX and on Windows and on Mac and even on VMS if you can find it.



If you are learning the language, you should not care about the OS at all, the only thing you should care about are the language compilers. An example of bad compiler is Turbo C/C++. Examples of good compilers are Comeau, GNU gcc, Intel icc, and MSVC 2010. My favorite is gcc because it supports the most of all new C++ language features (MSVC, surprisingly, supported almost as much back when its 2010 version was released, but gcc improved since then), and because with gcc I can get latest releases and bugfixes pretty much instantly. On the other hand, Comeau is the only compiler ever to support the complete 1998 C++ specification (nobody else was able to implement template export, and C++ had to deprecate that feature in 2010 as non-viable)



All that said, POSIX systems (such as Linux, other Unix systems, and even some non-Unix systems like LynxOS) offer a large library of C functions that lets your programs interact with the OS in many convenient ways. POSIX programming should be a separate topic from C programming, but it sure is a useful skill to learn. For that, Linux (any Linux) is a great environment.
hermandez
2016-12-10 17:11:57 UTC
Os Programming In C
Runa
2010-07-30 04:37:15 UTC
Linux/UNIX is the best platform I would think, largely because both are written in C from the ground up, while most larger applications are written in C++ and the source code is freely available for most of this software, making the modification and analysis of them much easier. Windows, VMS and other OS types use C and C++ as well, but the source code is not often available so that if you want to know how any one thing works, you have to make a best guess. Linux is POSIX compliant, so it is UNIX in everything but name.
RadioScarecrow
2010-07-30 04:25:14 UTC
Linux is POSIX compliant, so fulfils the Unix specifications.



Also it's great for programming in C/C++. I recently switched from linux to mac and I can definitely say that programming was nicer in linux(ubuntu).
Python
2010-07-30 04:24:10 UTC
I am a software developer and I have to do a lot of programming at home when I'm away from work. I started with Linux but you are looking for a Unix - System so that wont be any help to you.



Most development systems for micro controllers use Windows based software. Same goes for compilers, most are windows based. So best in this case means ease of installation , wide availability and support with regards to the development software and hardware to transfer the firmware into the chip. When you run into difficulties in your firmware or programmer and are looking for help the last thing you need to deal with is a non standard OS.



I am not saying that it is impossible but rather a Windows based development system has lots of support and a wide user base.



I prefer Atmel uC's as they have free development tools and a free C compiler. IAR systems also offers a free version of there professional C compiler (limited to 4K compile). Microchip only offers MPASM for free.



Parallax has the Basic Stamp and Propeller, they offer free development tools
Fred
2010-07-30 05:46:44 UTC
Mac OS X is Unix. It is based on FreeBSD, which you can also obtain and install.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...