Skip to content

Instantly share code, notes, and snippets.

@nikolai-wolterstorff
Last active March 29, 2021 15:36
Show Gist options
  • Select an option

  • Save nikolai-wolterstorff/4e749e6dacc316be433ccf4e7694b10f to your computer and use it in GitHub Desktop.

Select an option

Save nikolai-wolterstorff/4e749e6dacc316be433ccf4e7694b10f to your computer and use it in GitHub Desktop.
Compile and run C++
Compile:
- $ g++ <file.cpp> -o <binary_file>
- Ex: $ g++ hello_world.cpp -o hello_world
- Ex Windows: >C:\MinGW\bin\g++ hello_world.cpp -o hello_world.exe
- OpenCV included: $ g++ <file.cpp> -o <binary_file> `pkg-config --cflags --libs opencv`
Run:
- $ ./<binary_file>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment