It's been quite some times since I began learning C and C++ but I've been very limited only to the Windows platform and the Visual Studio environment. Recently, I wanted to look into some open source C/C++ projects, so I downloaded a few but I was frustrated because I didn't know how to compile those software. Then I had to learn about all those g++ and make stuff and still I only have very limited knowledge in those subjects.Having been used to an environment like Visual Studio, where you can write the code, hit the play button and boom you're all good to go, it was hard for me to compile a program with the command line at first. So my question is, if you're a C/C++ developer, how do you compile your code ? How do you compile relatively large code bases ? What are the tools that you use ? Do you use IDEs or simply text editors ? What is the compiler that you use ? Do you build your applications from the command line ? What is the OS that you usually compile on ?SideNote: My linux knowledge is zero.
How do you usually compile C/C++ source code ? (Large code bases)
c++;c;operating systems;compilation
At least for free software on Linux, you usually use some builder like make. You could use some other builder program, like scons or omakeFor some (mostly historical) reasons, the Makefile may be generated by utilities like autoconf or cmake; these generators also deal with configuration issues (e.g. they disable some features of the software if a dependency is missing). Some frameworks also provide their own Makefile generators, e.g. qmake for QtPS. Recent GNU make 4  has a lot of new features (plugins and guile scriptability) which are worthwhile (and probably could IMHO remove the necessity of generating Makefile-s).When building large C++ code base, I recommend using command line utilities (notably make), because you understand more what is really happening. Also, a lot of large C++ code bases are sometimes using specialized C++ code generators (e.g. the GCC compiler has a dozen of them, internal to it). There are good reasons to sometimes generate some C++ code (perhaps with a simple awk or python script), e.g. some headers or constants, etc.To build many GNU -or other- large free software bases -at least on Linux-, you generally don't need to understand all the details of their building. Usually, a README or an INSTALL text file explains how to do that, and it is often -for software using autoconf-  (but not always) as simple as running the three commands ./configure make sudo make installYou might prefer to run make install DESTDIR=/tmp/installdir/ then copy the /tmp/installdir with e.g. sudo cp -va /tmp/installdir/ /For software using cmake, building them is often as simple asmkdir build cd buildcmake ..makesudo make installThe pkg-config is also a useful utility, since it gives the compilation and linking flags useful with some packages.Large software may be difficult to build because of the dependency hell (which is an issue for every large software, on any operating system). Linux distributions are done to manage with it.I guess that these free software are often easier to build on Linux than on Windows (which I don't know and never use). BTW, I strongly recommend you to install Linux and learn it, because it is fun and made of free software (whose source code you can study, improve, and contribute to).Very large or foundational free software like the GCC compiler, the GNU glibc, the Linux kernel are tricky to build (because nearly everything depend upon them). So start building some easier free software from source code. See sourceforge or github to find some.Some languages or frameworks have their own installer or package manager or builder. For example, ocaml has opamBTW, notice that all IDE (including Visual Studio on Windows) are just editors with some graphical interface to run the C++ compiler on the command line. So it is better to understand what is really happening, by knowing how to run the compiler thru commands.