1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00

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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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`