Jump to content

C++: Difference between revisions

64 bytes added ,  23 February 2022
Line 6: Line 6:
===Compilation===
===Compilation===
{{See also|CMake|Makefile}}
{{See also|CMake|Makefile}}
====cmake====
====g++====
====g++====
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
g++ my_driver.c [-Iincludefolder] -o my_program.out
g++ my_driver.c [-Iincludefolder] -o my_program.out
</syntaxhighlight>
</syntaxhighlight>
Misc optimizations
Standard optimizations
* <code>-std=c++17</code> for C++17 support
* <code>-std=c++17</code> for C++17 support
* <code>-O3</code> for level 3 optmizations
* <code>-O3</code> for level 3 optimizations
* <code>-g</code> to include debugging info


===Syntax===
===Syntax===