Compiling C++ Programs
In a previous post we saw how to create our first program in C++, the classic Hello World!. However, we did not see at any time how to run said program. Today we will see how to compile and run this simple program.
Compiler Installation
Most Linux systems come with C and C++ compilers. On GNU/Linux Debian based systems, just run the following command to install the compiler.
sudo apt-get install g++
Compilation
To compile programs developed in C just run the following command.
g++ -o out program.c output
Where program.c is the file with C code and output will be the compiled file that will be generated.
Execution
To run the program just execute it as follows:
./output
Categories
- Laravel
- Sublime Text
- OpenSSL
- PHPUnit
- Go
- Apache
- Docker
- MySQL
- OWASP
- SOLID
- JOSE
- PostgreSQL
- Static Code Analysis
- SSH
- Digital Ocean
- Java
- Javascript
- GNU/Linux Debian
- PHP
- POO
- Lenguaje C
- Lenguaje C++
- RegExp
- HTML
- Vue.js
- HTTP
- Redis
- Supervisor
- Buenas prácticas
- Ubuntu
- Webpack
- Vim
- Linux
- Arch Linux
- CSS
- Flutter
- Laravel Vapor
- CI/CD
- cPanel
- WHM
- Networking
- Python
- MacOS
- Lógica y algoritmia
- Git
- Dart
- AWS
- Codeception
- Visual Studio Code
- TypeScript
- SEO
- Node.js
- Nuxt.js
- Google Cloud