diff --git a/pages/common/g++.md b/pages/common/g++.md index fff1474226..f9c620257f 100644 --- a/pages/common/g++.md +++ b/pages/common/g++.md @@ -19,3 +19,11 @@ - Include libraries located at a different path than the source file: `g++ {{path/to/source.cpp}} -o {{path/to/output_executable}} -I{{path/to/header}} -L{{path/to/library}} -l{{library_name}}` + +- Compile and link multiple source code files into an executable binary: + +`g++ -c {{path/to/source_1.cpp path/to/source_2.cpp ...}} && g++ -o {{path/to/output_executable}} {{path/to/source_1.o path/to/source_2.o ...}}` + +- Display version: + +`g++ --version`