GCC - C/C++ Compiler
This chapter provides introductions and tutorial examples about GCC C/C++ compilers. Topics include installing GCC C/C++ compilers; GCC compilation steps and settings; 'g++ -I' for include header files; g++ -l' for static/dynamic library files; 'g++ -shared' for building shared object (dynamic library) file; 'ldd' for checking dynamic library dependencies; 'make' tool for automation.
Install GCC C/C++ Compilers
"g++ --verbose" - GCC Compiler Steps and Settings
"g++ -I..." and CPATH Environment Variable
"g++ -l..." to Link with Library Files
"g++ -c" and "ar src" to Build Static Library
"g++ -shared" to Build Dynamic Library
"ldd" - Dynamic Library Dependency Checker
"make" - Manage Program Build Process
- Installing the GCC C/C++ compilers can be done using "dnf install gcc"
and "dnf install gcc-c++" commands on CentOS systems.
- Dumping PHP environment information can be done by using the "php -i" command.
- Include header file paths can be specified by "g++ -I..." option or CPATH environment variable.
- Static and dynamic library files can be specified by "g++ -l... -l..." options.
- Static and dynamic library file paths can be specified by "g++ -L..." option
or LIBRARY_PATH environment variable at the link time.
- Dynamic library file paths can be specified by LD_LIBRARY_PATH environment
variable at the execution load time.
- Dynamic library dependencies of any executable program can be listed by the "ldd" command.
- Building (compiling, linking, ...) C/C++ programs can be automated by the "make" tool,
which uses "Makefile" to define tasks involved in the building process.
Table of Contents
About This Book
Introduction to Linux Systems
Files and Directories
Running Apache Web Server (httpd) on Linux Systems
Running PHP Scripts on Linux Systems
Running MySQL Database Server on Linux Systems
Running Python Scripts on Linux Systems
Conda - Environment and Package Manager
►GCC - C/C++ Compiler
Graphics Environments on Linux
SquirrelMail - Webmail in PHP
Tools and Utilities
Full Version in PDF/EPUB