What is the best operating system to develop while using C++? I would like the OS that has more tools and software for C++ development. I also want to develop only for the command line, because I find GUI development in C++ to be confusing.
Well, to start out I recommend coding on linux with g++ for your compiler, gdb as your debugger and <insert favorite text editor>
as your text editor.
For me when I was first learning C++ I always had the following windows open:
- Termial for compiling
- Browser at cplusplus.com for documentation
- Gedit for editing files
That will help keep things simple to start with.
If you start doing anything more than just learning and getting used to the language and environment, I would switch to a more feature filled IDE. (Visual studio, Eclipse CDT, Codeblocks)
The answer to this question is subjective by the question's very nature, but I'll go out on a limb and say that a Linux or Unix environment is probably easier to work with when doing C++ programming from the command line.
That said, many of the tools (like the G++ compiler and GNU make) you would use in such an environment are portable to other OSes, such as Windows (see Cygwin or MinGW). However, they're a little more integrated with the environment in Linux.
Depends what your target platform is. Generally I would develop on the same platform that my programs are targeting.
Just because you may be developing a command line program for example, doesn't make the Visual Studio debugger any less sweet or fit for the task.
If you want to learn a whole lot of tools, especially command-line tools, then Linux is an easy answer. Edit: I should also note that this will help you gain a more historical perspective on C++ development, as developing from the command line using traditional *nix tools has sorta looked the same for a long, long time. In fact, on my Linux machine I can in only a few minutes setup an "environment", if you can even call it that, that's just about identical to what I was using in 1994 on OSF (gcc, emacs, make, etc). I should also clarify that there are certainly IDEs for Linux, you're not just stuck on the command line...it's just that most tools in this camp are command-line first.
If you just want to learn C++ (e.g. click a button to compile, debug, etc without caring about the nitty gritty of compiling and linking), then there are a lot of IDEs for Windows that'll work fine and are easy to install, such as Bloodshed.
As far as communicating with the end user via the command line, it doesn't really matter which you choose, cout << "will work the same on either platform." << endl;
Thanks to QtCreator you can get a pretty decent development (+debugging) environment setup on Linux, Mac, or Windows without too much hassle. You don't even need to really use Qt if you don't want too.
That being said, the OS you are developing on becomes less relevant if you are only using it for learning. The OS you use should not get in the way of your development process so pick the one that is most comfortable to you. Although, once you have a target platform for whatever you are working on, it would make the most sense to develop on that one.
hey, don't forget good old DOS Borland Turbo C++ 3.0. I learned C++ using that compiler loooong time ago. It perfectly supported anything from compiling C code to C++ sophisticated features like RTTI and templates. And it is ideal for command line! At least I thought so back then.
Using an IDE should not be challenging - take the time to try one of the modern ones. If you want command line tools all the OSes and compilers generally have whatever tools you need.
For me, the real issue is the debugging and other productivity improving tools I can use. I prefer to use the IDE for stepping through code and debugging. Using a command line debugger is a frustration I hope to have left behind for good...
As others have said, work on the platform you are most comfortable with consider the platform(s) you are targeting.
With VMs and cross platform tools and frameworks this is less and less of an issue.
EDIT
You'll find that time spent learning how to be productive with your IDE(s) (whichever you choose) will be time well spent. If you can't get someone to show you (or just watch someone coding), then try some online tutorials or webcasts. It will be well worth it.
Your improved productivity can be huge. In general learning the tools will be a great help.
I think it would be better to ask which OS you are familiar with and which OS you want to target with your implementations. I wouldn't switch operating systems just to learn a language. Both Windows and Linux (but not as much the Mac) are great places to learn C++.
Windows is best programmed in C++. The underlying APIs are all C or C++ based. The documentation is all aimed at C++ programming. Visual Studio is generally considered the best development environment for C++ on any platform (I'm sure I'll get disagreement from some corners on this one). The debugger in Visual Studio is superior to gdb/ddd that you'll find on Linux.
Linux is also a great C++ development environment. Gcc is a great compiler. Gdb is an acceptable debugger. There are lots of good tools and documentation available for how to use C++ here. Most of the OS APIs are aimed at C or C++ development.
You won't go wrong with either choice. The frustation of trying to learn a new OS along with a new language may be too much though. Stick with what you know.
Best OS for C++: Mac OS X.
All the Unix CLI, AND all the GUI, as well as the Posix headers and many many free tools.
XCode is a decent IDE, and you can also use emacs, which can function as a command-line IDE. (so can vim, but I am not a vim person. ;-) ).
Linux especially since you're interested in using the cmd line. Infact c/c++ development was what originally attracted me to Linux. GCC is top notch and there's a wide variety of build tools (make, scons, cmake, jam). I would start out using gedit or something similar and then take some time and learn how to use vim.
For just learning a new language, I think it's important to keep it straightforward and simple, so you can just focus on the code itself. With vi + gcc, I can write a single .cpp file and have it compile to a single executable. No PDBs, no DSWs, and no DSPs cluttering up my environment and possibly causing problems. Perfect for trying out new things to see how they work.
While IDEs are certainly useful tools for real world large projects, I've seen time and again where the extra complexity they introduce just gets in the way. When someone's still trying to learn how #include and cout work, they don't need to be worrying about project and solution settings. Therefor, I recommend using a text editor with syntax highlighting and gcc or some other standalone compiler rather than an IDE for learning.
As for the OS, learn on whatever is most comfortable to you. Learning a language (especially C++) is hard, and you don't really want to be fighting with a foreign OS at the same time. If you're comfortable on both Windows and Linux and have both readily available, switch back and forth. It'll make you more flexible, and if you're doing it right, your code should run the same on both OSes.
That's easy. Just choose the OS that you are most comfortable with today. Windows, MacOSX and Linux all have a good C++ tools.
Either Mac or Linux. Windows has an extremely primitive command-line support.
I'm admittedly biased, but I'd recommend Linux. If you want to develop via command-line, it's perfectly suited to it; if you want an IDE, Code::Blocks is pretty nice.
If you decide to use vim for command-line hacking, I highly recommend checking out OmniCPPComplete (the site won't let me post another link, but it's just a Google search away). Sadly, it's not up to par with VS's Intellisense, but it's a heck of an upgrade to ctags. :D
There is no difference what OS you will use. You only need conformant compiler and good text editor.