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:
parent
e7c078a13f
commit
f89ebb43b9
1 changed files with 8 additions and 0 deletions
|
@ -19,3 +19,11 @@
|
||||||
- Include libraries located at a different path than the source file:
|
- 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}}`
|
`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`
|
||||||
|
|
Loading…
Add table
Reference in a new issue