g++: add multiple file example (#8468)

This commit is contained in:
Keshavshyper6325
2022-09-20 09:17:58 +05:30
committed by GitHub
parent e7c078a13f
commit f89ebb43b9

View File

@@ -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`